Run Multiple Ingress-Nginx Controller in Kubernetes Namespaces.
In this article, I would like to cover, How to we run the Ingress-nginx controller in namespaces which can be controlled separately easily instead of having controlled at Cluster level.
Please notes, there are quite a number of ingress helm charts available on github. This is only focused on `ingress-nginx`. It is important to have namespaces which can be controlled by teams on K8 Resources.
If you are looking for `nginx-ingress controller` or `nginx-ingress` tools, this is not the articles which can help probably.
Reference: https://github.com/kubernetes/ingress-nginx/releases
Kubernetes version: 1.22 +
Ingress-nginx: 1.3.1 +
Helm Chart: https://github.com/kubernetes/ingress-nginx/releases/tag/helm-chart-4.2.5
Template:
ingress-nginx:
controller:
ingressClassByName: true
ingressClassResource:
enabled: true
name: "${NAMESPACE}-nginx"
If we follow above pattern, you should be able to enable to work with ingress-nginx in multiple namespaces across the cluster.
Once you apply above template in your ingress: you may verify the ingressclass resource
kubectl get ingressclass
My Background: I have been working with Kubernetes since 5+ years, I am seasonal blogger on some the issues, which I face during the setup to spread the knowledge on the K8.
Please do let me know in case of any issues.