Helm cant install ingress-controller

Viewed 12

Good day!

i trying install ingress-controller (ingress-nginx) by HELM

helm upgrade --install ingress-nginx ingress-nginx \
  --repo https://kubernetes.github.io/ingress-nginx \
  --namespace ingress-nginx --create-namespace

result: error

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; 
   label validation error: missing key "app.kubernetes.io/managed-by": must be set to "Helm"; annotation validation error: missing key "meta.helm.sh/release-name": must be set to "ingress-nginx"; annotation validation error: missing key "meta.helm.sh/release-namespace": must be set to "mylabel-production"

What am I doing wrong?

1 Answers

It turned out to be necessary to remove objects from past installations. That I did not know about. Run the following command in the space in which your ingress-ngi was running

delete services

kubectl get services --all-namespaces

kuebctl delete service <ingress-nginx>

delete deploymnets

kubectl get deployment --all-namespaces

--show deployment--

kubectl delete deployment <ingres-nginx-deployment>

delete cluster-role and other

then try but be careful! Don't delete anything unnecessary. For me, the following has been helpful

kubectl delete clusterrolebinding ingress-nginx
kubectl delete clusterrolebinding ingress-nginx-admission

kubectl delete clusterrole ingress-nginx
kubectl delete clusterrole ingress-nginx-admission

kubectl delete ingressclass nginx
kubectl delete validatingwebhookconfiguration ingress-nginx-admission
Related