I installed ingress-nginx to my cluster like that:
helm upgrade --install ingress-nginx ingress-nginx --repo https://kubernetes.github.io/ingress-nginx --namespace ingress-nginx --create-namespace --set controller.service.loadBalancerIP=REDACTED --set controller.service.externalTrafficPolicy=Local
Initially, my cluster had only one node, but now I added another. I see that ingress-nginx-controller deployment is present only on the first node – shouldn’t it be present on every node though? What should I do about it?
2
Answers
No, out of the box, ingress-nginx will install as a Deployment, not as a DaemonSet.
You need to set
controller.kind
toDaemonSet
to make the controller deploy as a DaemonSet. See https://github.com/kubernetes/ingress-nginx/tree/main/charts/ingress-nginx for parametersNo, the nginx controller does not need to be present on every node in your k8s cluster for a helm upgrade.
During a helm upgrade the helm charts only modifies the existing deployment or Daemonset configuration; it does not impact the number of nginx ingress controller pods running in the cluster.
If you want ingress-nginx-controller deployment to be present on every node though you can use the daemonset or if you want to make sure Nginx ingress controller POD only runs on nodes on which your backend service is running, you can use affinity and anti-affinity.
If you want multiple Ingress Controllers to coexist in one cluster you can ingress class concepts.
The Ingress class has the following characteristics:
You can also refer to this link on Installation with helm for more information.