Add docs on Election ID to Multiple Ingress Controller guide (#8855)

This commit is contained in:
qilong.qiu 2022-07-22 19:21:38 +08:00 committed by GitHub
parent c86d50ecef
commit a581a7bebc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

View file

@ -8,7 +8,7 @@ To fix this problem, use [IngressClasses](https://kubernetes.io/docs/concepts/se
If all ingress controllers respect IngressClasses (e.g. multiple instances of ingress-nginx v1.0), you can deploy two Ingress controllers by granting them control over two different IngressClasses, then selecting one of the two IngressClasses with `ingressClassName`.
First, ensure the `--controller-class=` and `--ingress-class` are set to something different on each ingress controller:
First, ensure the `--controller-class=` and `--ingress-class` are set to something different on each ingress controller, If your additional ingress controller is to be installed in a namespace, where there is/are one/more-than-one ingress-nginx-controller(s) already installed, then you need to specify a different unique `--election-id` for the new instance of the controller.
```yaml
# ingress-nginx Deployment/Statefulset
@ -19,6 +19,7 @@ spec:
- name: ingress-nginx-internal-controller
args:
- /nginx-ingress-controller
- '--election-id=ingress-controller-leader'
- '--controller-class=k8s.io/internal-ingress-nginx'
- '--ingress-class=k8s.io/internal-nginx'
...
@ -53,6 +54,7 @@ or if installing with Helm:
```yaml
controller:
electionID: ingress-controller-leader
ingressClassResource:
name: internal-nginx # default: nginx
enabled: true