Ingress Configuration

Here is a brief overview of how you can configure your ingress manually.
Requires one of the following licenses:
  • CM: Standard, Professional, Enterprise
  • DCM: Standard, Professional, Enterprise

Manual configuration of the Nginx-Ingress-Controller

Right now the Ingress Controller Package is not fully configured. To make complete use of the Ingress capabilities of the cluster, the user needs to manually update some of the settings of the corresponding service.

Choosing an ingress controller. KubeOps ships two ingress controllers: ingress-nginx and traefik. NGINX has reached end of support, so new clusters should prefer Traefik and existing clusters should plan a migration. To replace nginx-ingress with Traefik (including how SSO, certificates and dashboards keep working), follow How to migrate from nginx to traefik ingress. The rest of this page covers the manual nginx service configuration.

Locating the service

The Service you need is called ingress-nginx-controller. It is located in the same namespace as the ingress package. To find it across all namespaces, run the following command:

kubectl get service -A | grep ingress-nginx-controller

This command should return two entries of services:

  • “ingress-nginx-controller” and
  • “ingress-nginx-controller-admission”

Only ingress-nginx-controller needs to be updated.

Set the Ingress-Controller service to type NodePort

To edit the service, run the following command. The namespace in your environment may be different, so adjust it if needed.

kubectl patch service ingress-nginx-controller -n ingress -p '{"spec":{"type":"NodePort"}}'

After this change, Kubernetes automatically assigns unused node port numbers for HTTP and HTTPS access. You can check the assigned ports by running the same command used earlier to locate the service.
If you want to use specific port numbers instead, you can run the following command. This assigns port 30080 for HTTP and 30443 for HTTPS. Before using these values, make sure they are not already in use by another NodePort service.

kubectl patch service ingress-nginx-controller -n ingress --type=json -p '[{"op":"replace","path":"/spec/type","value":"NodePort"}, {"op":"add","path":"/spec/ports/0/nodePort","value":30080}, {"op":"add","path":"/spec/ports/1/nodePort","value":30443}]'

Configure external IPs

If you have external IP addresses that route traffic to one or more cluster nodes, you can expose Kubernetes Services of any type through them.

The following example adds the external IP address 192.168.0.1 to the service. Replace this value with the IP address that matches your network setup.

kubectl patch service ingress-nginx-controller -n ingress -p '{"spec":{"externalIPs":["192.168.0.1"]}}'