ingress-nginx: Unable to install multiple helm ingress-nginx releases for different namespaces
NGINX Ingress controller version: ingress-nginx-4.0.1
Kubernetes version (use kubectl version):
-
Client Version: v1.21.3
-
Server Version: v1.19.11
-
How was the ingress-nginx-controller installed: helm release
helm install banking-api-dev ingress-nginx/ingress-nginx --namespace development
-
output of
helm ls -A
-
If helm was used then please show output of
helm -n <ingresscontrollernamepspace> get values <helmreleasename>
-
Current State of the controller:

What happened: Trying to install ingress-nginx for certain services with different namespaces, the first release is installed successfully, but the second one is failing with the below error:
helm install banking-api-stg ingress-nginx/ingress-nginx --namespace staging
Error: rendered manifests contain a resource that already exists. Unable to continue with install: IngressClass "nginx" in namespace "" exists and cannot be imported into the current release: invalid ownership metadata; annotation validation error: key "meta.helm.sh/release-name" must equal "banking-api-stg": current value is "banking-api-dev"; annotation validation error: key "meta.helm.sh/release-namespace" must equal "staging": current value is "development"
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 29 (10 by maintainers)
Try this ;
Step1
Step2
Step3
Step4
And update results with commands and outputs together copy/pasted
I was able to resolve it, actually i had to edit the tag in the public ip resources in the azure to fix it. Thanks
No, that’s the responsibility of helm chart.
Using –set controller.ingressClass=staging only not enough,
ingressClassResource.nameandingressClassResource.controllerValuemust be setat your ingress definition you must define the ingressClassName as:
@longwuyuan It works finally without creating ingressClass manually, I deleted all the classes and re-installed helm as you recommended.
Thanks for your support.