I am deploying nginx ingress controller for AKS cluster where I have one user node pool and one system node pool.
helm install nginx-ingress ingress-nginx/ingress-nginx --namespace basic-ingress --set controller.replicaCount=2 --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
Since replica count is = 2, when I am checking the pod status, I can see one pod is running in system node pool while 1 is running in user node pool.
Question:
Where should I run my nginx ingress pod, system pool or user pool as my all workloads deployed in user node pool?
Can I run both ingress replica in user node pool, if Yes, how?
Is there any latency if my ingress running in system pool and workload (.net application) runs on user pool?
It depend on why you decided to create multiple node pools in the first place, are the VM in the user pool have more resources? Is it because you want to keep the system node pool only for resources related to kubernetes? Anyway, The Ingress Controller can be deployed in the system pool without any problem.
With that said, if you want to run all the replicas in the user node pool, you'll need to set a label on the node of your node pool and then use a Node Selector on your Nginx Deployment. If you are using Helm, you can use the values to do that.
You wont really have more latency by having the ingress in a different node pool, anyway the pod you are trying to reach is not always in the same VM as the Ingress Controller even if both are in the same node pool.