vel
vel

Reputation: 1200

Kubernetes HELM - how to create multiple NGINX Ingress controllers one for each Node

I have two nodes for my cluster: Windows and Linux. And I have one master node. For Linux I installed NGINX controller and everything works perfectly fine!!!

helm install nginx-ingress ingress-nginx/ingress-nginx \
    -f internal-ingress.yaml \
    --set controller.nodeSelector."beta\.kubernetes\.io/os"=linux \
    --set defaultBackend.nodeSelector."beta\.kubernetes\.io/os"=linux \
    --set controller.admissionWebhooks.patch.nodeSelector."beta\.kubernetes\.io/os"=linux

So that NGINX Ingress Controller should target Linux Pod and that works!

Now I want to create NGINX Ingress Controller to target my second Node which is Windows. Once I tried to create it it threw me Error: timed out waiting for the condition I tried this command (very similar to working Linux command).

helm install nginx-ingress-win ingress-nginx/ingress-nginx -f internal-ingress.yaml 
--set controller.nodeSelector."beta\.kubernetes\.io/os"=windows 
--set defaultBackend.nodeSelector."beta\.kubernetes\.io/os"=windows 
--set controller.admissionWebhooks.patch.nodeSelector."beta\.kubernetes\.io/os"=windows

Is it possible to have 2 NGINX Ingress Controllers? Why did it timeout? Am I doing something wrong? What should be the correct command to install NGINX Ingress Controller for Windows?

Thank you

Upvotes: 2

Views: 2308

Answers (1)

Sagar Velankar
Sagar Velankar

Reputation: 855

  • helm install creates kubernetes objects in the current namespace of your context. You should use separate namespace for nginx-ingress-win release using --create-namespace --namespace namespacename flags

  • Please run the helm install command with --debug flag to see what is the problem

Final Command :

helm install nginx-ingress-win ingress-nginx/ingress-nginx -f internal-ingress.yaml 
--set controller.nodeSelector."beta\.kubernetes\.io/os"=windows 
--set defaultBackend.nodeSelector."beta\.kubernetes\.io/os"=windows 
--set controller.admissionWebhooks.patch.nodeSelector."beta\.kubernetes\.io/os"=windows 
 --create-namespace --namespace namespacename --debug
  • Please provide the reason for having separate nginx controller for linux and windows nodes in the same cluster.

Upvotes: 1

Related Questions