Helm Error: INSTALLATION FAILED : manifests contain a resource that already exists



  • When I run the helm command to install my-mysql-operator, I get

    helm install my-mysql-operator mysql-operator/mysql-operator --namespace mysql-operator --create-namespace
    

    I get the following error,

    Error: INSTALLATION FAILED: rendered manifests contain a resource that already exists. Unable to continue with install: ClusterRole "mysql-operator" in namespace "" exists and cannot be imported into the current release: invalid ownership metadata; annotation validation error: key "meta.helm.sh/release-namespace" must equal "mysql-operator": current value is "mysql"

    So so the resource exists, how do I delete it?



  • You can see everything helm has installed with

    helm list --all-namespaces
    

    Which should return something like this

    ❯ helm list --all-namespaces
    NAME                    NAMESPACE       REVISION        UPDATED                                 STATUS          CHART                   APP VERSION 
    my-mysql-operator       mysql           1               2022-05-26 12:18:28.652497947 -0500 CDT deployed        mysql-operator-2.0.4    8.0.29-2.0.4
    

    The problem here is that the resource my-mysql-operator is currently installed into the mysql namespace. In order to delete it and recreate it you can do,

    helm uninstall -n mysql my-mysql-operator
    

    Then you should be able to run the above command.


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2