Add an Ingress manually
Last updated
Last updated
From the menu select Ingresses then click Add with form.
Select the namespace that the Ingress needs to be created in from the list.
Complete the required information, using the sections below as a guide.
Ingress name
Enter a descriptive name for the ingress.
Ingress class
Select an Ingress Class object from the list, or select none when no IngressClass
info is needed in the Ingress specification.
Add annotation
Click the add annotation button to add one or more annotations. For example:
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
Note for Google Cloud users
Google Cloud ingress controller (gce or GKE Ingress) continues to use the deprecated kubernetes.io/ingress.class
annotation on ingresses, whereas most other ingress controllers use the IngressClass
resource that was introduced in Kubernetes 1.18.
Portainer targets the IngressClass
resource means of specifying ingress classes, but you can still use the Google Cloud ingress controllers by turning on the Allow ingress class to be set to "none" toggle in Cluster setup and setting them up as custom with none
selected as their Ingress class. Then when adding an ingress based on this, set an annotation with the key kubernetes.io/ingress.class
and value gce.
Here you can define the specifics for the Ingress rule:
Hostname
Enter the FQDN that the application should be accessed with
eg: myapp.mydomain.com
.
TLS Secret
Select the TLS secret that holds the SSL certificate information for the hostname entered above. Optionally, create a new TLS Secret by clicking on ConfigMaps & Secrets link (opens in a new tab). Once secret is created click on Reload TLS Secrets and select the new secret.
Service
Select a service that you want to expose from the list. Note that only ClusterIP services are available from this list.
Service port
Select the port that needs to be exposed from the list.
Path type
Select the relevant path type. The default is Prefix
.
Path
Enter the path to expose the application on. To expose on the root of the domain use /
.
You can expose other services using a different path by clicking on Add Path.
Add more rules by clicking on Add new host or a fallback rule by Add fallback rule.
A fallback rule has no host specified. This rule only applies when an inbound request has a hostname that does not match with any of your other rules.
When you're ready, click Create.