Skip to content

Expose an applicationΒΆ

This guide will show you how to expose your application to end-users or applications in other environments by using an ingress.

If your application only needs to be available to other applications running in the same environment, you should use service discovery instead.

Select audienceΒΆ

Select the correct audience from the available domains in your environment.

Define ingressΒΆ

Specify the desired hostname for your application in the application manifest with .spec.ingresses[]:

.nais/app.yaml
apiVersion: nais.io/v1alpha1
kind: Application
spec:
  ingresses:
    - https://<MY-SUBDOMAIN>.<ENVIRONMENT-DOMAIN>

Subdomain restrictions

Subdomains must only contain lowercase letters, numbers, and hyphens. They may not start or end with a hyphen.

Only one level of subdomains is allowed, e.g.:

  • <MY-SUBDOMAIN>.<ENVIRONMENT-DOMAIN> is allowed
  • <MY-SUBSUBDOMAIN>.<MY-SUBDOMAIN>.<ENVIRONMENT-DOMAIN> is not allowed

Optional: Specify path for ingressΒΆ

An ingress may include a path to expose a subset of your application:

.nais/app.yaml
apiVersion: nais.io/v1alpha1
kind: Application
spec:
  ingresses:
    - https://<MY-SUBDOMAIN>.<ENVIRONMENT-DOMAIN>/some-path