docs_multiple_instances_one_cluster_ticket_7543 (#8042)
This commit is contained in:
parent
13e711bddd
commit
2ff5af08d4
2 changed files with 9 additions and 5 deletions
|
@ -132,8 +132,10 @@ spec:
|
||||||
```
|
```
|
||||||
And add the value "spec.ingressClassName=nginx" in your Ingress objects
|
And add the value "spec.ingressClassName=nginx" in your Ingress objects
|
||||||
|
|
||||||
## I have multiple Ingress objects in my cluster. What should I do ?
|
|
||||||
- If you don't care about ingress classes, or you have a lot of Ingress objects without any IngressClass configuration, you can run the ingress-controller with the flag `--watch-ingress-without-class=true`.
|
## I have multiple ingress objects in my cluster. What should I do ?
|
||||||
|
- If you have lot of ingress objects without ingressClass configuration, you can run the ingress-controller with the flag `--watch-ingress-without-class=true`.
|
||||||
|
|
||||||
|
|
||||||
### What is the flag '--watch-ingress-without-class' ?
|
### What is the flag '--watch-ingress-without-class' ?
|
||||||
- Its a flag that is passed,as an argument, to the `nginx-ingress-controller` executable. In the configuration, it looks like this ;
|
- Its a flag that is passed,as an argument, to the `nginx-ingress-controller` executable. In the configuration, it looks like this ;
|
||||||
|
|
|
@ -2,13 +2,14 @@
|
||||||
|
|
||||||
By default, deploying multiple Ingress controllers (e.g., `ingress-nginx` & `gce`) will result in all controllers simultaneously racing to update Ingress status fields in confusing ways.
|
By default, deploying multiple Ingress controllers (e.g., `ingress-nginx` & `gce`) will result in all controllers simultaneously racing to update Ingress status fields in confusing ways.
|
||||||
|
|
||||||
To fix this problem, you can either use [IngressClasses](https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-class) (preferred) or use the `kubernetes.io/ingress.class` annotation (in deprecation).
|
To fix this problem, use [IngressClasses](https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-class), the `kubernetes.io/ingress.class` annotation is deprecated from kubernetes v1.22+.
|
||||||
|
|
||||||
## Using IngressClasses
|
## Using IngressClasses
|
||||||
|
|
||||||
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`.
|
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`.
|
||||||
|
When two or more
|
||||||
|
|
||||||
First, ensure the `--controller-class=` is 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:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# ingress-nginx Deployment/Statfulset
|
# ingress-nginx Deployment/Statfulset
|
||||||
|
@ -19,7 +20,8 @@ spec:
|
||||||
- name: ingress-nginx-internal-controller
|
- name: ingress-nginx-internal-controller
|
||||||
args:
|
args:
|
||||||
- /nginx-ingress-controller
|
- /nginx-ingress-controller
|
||||||
- '--controller-class=k8s.io/internal-ingress-nginx'
|
- '--controller-class=k8s.io/internal-nginx'
|
||||||
|
- '--ingress-class=k8s.io/internal-nginx'
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue