added example to install multiple instances of controller (#7718)

This commit is contained in:
Long Wu Yuan 2021-09-28 21:38:43 +05:30 committed by GitHub
parent 0b40037675
commit be9a7bea4a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -172,7 +172,7 @@ Bear in mind that, if your `Ingress-Nginx-Controller-nginx2` is started with the
## How to easily install multiple instances of the ingress-NGINX controller in the same cluster ?
- Create a new namespace
```
kubectl create namespace ingress-controller-2
kubectl create namespace ingress-nginx-2
```
- Use helm to install the additional instance of the ingress controller
- Ensure you have helm working (refer to helm documentation)
@ -186,9 +186,11 @@ Bear in mind that, if your `Ingress-Nginx-Controller-nginx2` is started with the
```
- Now you install the additional instance of the ingress-NGINX controller like this ;
```
helm --namespace ingress-controller-2 install ingcontroller-2 ingress-nginx/ingress-nginx \
--set controller.ingressClass=ingress-class-2 \
--set controller.ingressClassResource.name=ingress-class-2 \
--set controller.ingressClassResource.controllerValue= "k8s.io/ingress-controller-2"
helm install ingress-nginx-2 ingress-nginx/ingress-nginx \
--namespace ingress-nginx-2 \
--set controller.ingressClassResource.name=nginx-2 \
--set controller.ingressClassResource.controllerValue= "k8s.io/ingress-nginx-2" \
--set controller.ingressClassResource.enabled=true \
--set controller.IngressClassByName=true
```
- If you need to install yet another instance, then repeat the procedure to create a new namespace, change the values like names & namespaces (for example from "-2" to "-3"), or anything else that meets your needs.