skip to Main Content

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


  1. Chosen as BEST ANSWER

    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:

    apiVersion: networking.k8s.io/v1
    kind: Ingress
    metadata:
      name: some-ingress
      namespace: somenamespace
      annotations:
        kubernetes.io/ingress.class: <somename>
        ...
    spec:
      tls:
      ...
    

    it looks like:

    apiVersion: networking.k8s.io/v1
    kind: Ingress
    metadata:
      name: some-ingress
      namespace: somenamespace
      annotations:
        ...
    spec:
      ingressClassName: <somename>
      tls:
      ...
    

  2. If there is an existing ingress class resource with the same name eg:- nginx. Then delete the resource as shown below.

    search ingressClasses

    kubectl get ingressClasses
    

    Delete the nginx ingressClass

    kubectl delete ingressClasses nginx
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search