In AKS, we have a requirement to install two nginx controllers inside a single Kubernetes namespace. In fact, we need to assign each controller a dedicated IP and DNS address. Does it bring any conflict between controllers? Is there any best practice regarding having multiple nginx controllers in a namespace?
1 Answers
Your question can be answered with the help of the official documentations.
When running NGINX Ingress Controller, you have the following options with regards to which configuration resources it handles:
Cluster-wide Ingress Controller (default). The Ingress Controller handles configuration resources created in any namespace of the cluster. As NGINX is a high-performance load balancer capable of serving many applications at the same time, this option is used by default in our installation manifests and Helm chart.
Single-namespace Ingress Controller. You can configure the Ingress Controller to handle configuration resources only from a particular namespace, which is controlled through the
-watch-namespace
command-line argument. This can be useful if you want to use different NGINX Ingress Controllers for different applications, both in terms of isolation and/or operation.Ingress Controller for Specific Ingress Class. This option works in conjunction with either of the options above. You can further customize which configuration resources are handled by the Ingress Controller by configuring the class of the Ingress Controller and using that class in your configuration resources. See the section Configuring Ingress Class.
You may deploy any number of ingress controllers within a cluster. When you create an ingress, you should annotate each ingress with the appropriate ingress.class
to indicate which ingress controller should be used if more than one exists within your cluster.
The main idea is that the multiple Ingress controllers can co-exist and key off the ingress.class
annotation.

- 11,492
- 5
- 29
- 37
-
@EhsanMirsaeedi Did either of you managed to make it work? – Prakash Vishwakarma Mar 18 '21 at 15:45
-
@EhsanMirsaeedi, Please let us know your approach. Thanks in advance! – Jithin Zachariah Jul 13 '21 at 07:34