Skip to content

Exposing your applicationΒΆ

What good is an application if no one can reach it?

NAIS tries to make it easy to expose your application to the correct audience. Your audience may be other applications within the same environment, or it may be humans or machines on the outside.

Service discoveryΒΆ

If your audience is other applications within the same environment, they can communicate with your application directly by using service discovery.

Applications deployed to Kubernetes are automatically exposed through what is known as a Service. A service provides your application with an internal address that allows for direct communication within the environment / cluster.

The address is the name of your application:

http://<name>

If your consumers are in another namespace, the address should include the namespace as well:

http://<name>.<namespace>

Service discovery is the recommended way to communicate between applications running in the same environment.

Compared to ingresses, using service discovery has several advantages:

  • Fewer network hops and lower latency. Requests happen directly between applications. Requests to an ingress will go out of the environment to the internet, and then back to the environment.
  • Avoids unnecessary exposure. Applications can avoid being exposed to the outside world through an ingress if all of their consumers are internal.
  • Access policies are enforced on the network layer. This is not the case for traffic through an ingress.

🎯 Learn how to communicate with other workloads in the same environment.

IngressΒΆ

If your audiences consist of human users or other services outside the environment, you will have to expose your application by using an ingress.

An ingress exposes a route for inbound traffic from outside the environment to your application. The domain of the URL controls which users and environments that your application is reachable from.

Your application may specify multiple ingresses, each using the same or different domains.

Ingresses may also include paths. This allows for routing traffic to only specific parts of your application, or as part of a shared domain between multiple applications.

🎯 Learn how to expose your application with an ingress.

πŸ“š See the ingress reference for technical details and options.

Ingress redirectsΒΆ

In some cases, you may want to redirect traffic from one domain to another. This can be useful if you have changed the domain of your application, or if you want to redirect users from an old domain to a new one.

🎯 Learn how to redirect traffic with an ingress.

πŸ“š See the ingress reference for technical details and options.