Help Center/ Cloud Container Engine/ FAQs/ Chart and Add-on/ What Should I Do If a Release Creation or Upgrade Fails and "rendered manifests contain a resource that already exists" Is Displayed?
Updated on 2024-07-04 GMT+08:00

What Should I Do If a Release Creation or Upgrade Fails and "rendered manifests contain a resource that already exists" Is Displayed?

Symptom

When a release cannot be created or upgraded, the error message "Create release by helm failed:rendered manifests contain a resource that already exists" is displayed. Unable to continue with install: ..., label validation error:missing key \"app.kubernetes.io/managed-by\":must be set to\"Helm\" ... Failed to create the release.

Possible Causes

If the preceding error information is displayed, the release is not created using Helm v3. If a release with the same name exists in the environment and does not have the home tag app.kubernetes.io/managed-by: Helm of Helm v3, a conflict message is displayed.

Solution

Delete the release and create it again using Helm.

  1. Check the error message and locate the release that causes the conflict. Pay attention to the information following Unable to continue with install:. For example, the following error message indicates that a conflict occurs in the test-nginx Deployment in the default namespace.

  2. Go to the cluster console or run the following kubectl command to delete the test-nginx Deployment. The preceding information is only an example. Perform operations according to the actual error information.

    kubectl delete deploy test-nginx -n default

  3. After the conflict is resolved, reinstall the chart.