From 2ff5af08d425d9b20744c333f4d68a7781c0b86b Mon Sep 17 00:00:00 2001 From: Mani Kanth Date: Wed, 22 Dec 2021 16:23:35 +0530 Subject: [PATCH] docs_multiple_instances_one_cluster_ticket_7543 (#8042) --- docs/index.md | 6 ++++-- docs/user-guide/multiple-ingress.md | 8 +++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/index.md b/docs/index.md index 182674947..b06141814 100644 --- a/docs/index.md +++ b/docs/index.md @@ -132,8 +132,10 @@ spec: ``` 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' ? - Its a flag that is passed,as an argument, to the `nginx-ingress-controller` executable. In the configuration, it looks like this ; diff --git a/docs/user-guide/multiple-ingress.md b/docs/user-guide/multiple-ingress.md index b0125c3b2..f13574044 100644 --- a/docs/user-guide/multiple-ingress.md +++ b/docs/user-guide/multiple-ingress.md @@ -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. -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 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 # ingress-nginx Deployment/Statfulset @@ -19,7 +20,8 @@ spec: - name: ingress-nginx-internal-controller args: - /nginx-ingress-controller - - '--controller-class=k8s.io/internal-ingress-nginx' + - '--controller-class=k8s.io/internal-nginx' + - '--ingress-class=k8s.io/internal-nginx' ... ```