How to resolve resources already exists in helm manifest


  • In some cases, the user could not install/upgrade helm release because some resources exist in clusters already.
helm install helm/cert-manager-app --name cert-manager-app --namespace cert-manager-app --values helm/cert-manager-app/values.yaml
Error: serviceaccounts "cert-manager-giantswarm-clusterissuer" already exists

How to solve it

  • From helm 3.2.0, you could add helm label and annotations into dangling objects and helm would adopt them as one of their manifests.

To solve the above example, we could put the following label, annotations as below.

kubectl -n $NAMESPACE annotate $KIND $NAME$RELEASE
kubectl -n $NAMESPACE annotate $KIND $NAME$NAMESPACE
kubectl -n $NAMESPACE label $KIND $NAME

Now run helm install/upgrade again, and you will find it is now part of helm manifest.