I keep getting this error or variations when I try to do as it asks:
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 "new-ingress-nginx": current value is "old-ingress-nginx"
I’m using helm to install:
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update
helm install new-ingress-nginx ingress-nginx/ingress-nginx --set-string controller.podAnnotations."app.kubernetes.io/instance"="new"
I’ve tried with and without the podAnnotations as I found a post mentioning to try that.
I’m using google kubernetes engine and what I have done is merged all my api’s under one load balancer/ingress-nginx but I would like to figure out the issue.
2
Answers
I was able to solve my problem after reading through this on github
Some changes were made and
--set controller.ingressClassResource.name=<somename>
is now used and the yaml file no longer looks like:it looks like:
If there is an existing ingress class resource with the same name eg:- nginx. Then delete the resource as shown below.
search ingressClasses
Delete the nginx ingressClass