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

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

Symptom

When a chart cannot be created or upgraded, the error message "Create release by helm failed: rendered manifests contain a resource that already exists. Unable to continue with install: ..." is displayed.

CCE add-ons are installed using charts. The same error may occur when an add-on is installed or upgraded.

Possible Cause

This error message indicates that there are some residual resources related to the chart or add-on in the cluster. The possible causes are as follows:

  • Chart resources (such as releases) were mistakenly or abnormally deleted in the backend.
  • The namespace installed using the chart was directly deleted, leaving residual resources.
  • A resource with the same name as a chart component exists in the cluster but lacks the app.kubernetes.io/managed-by: Helm label.

Solution

Access the cluster using kubectl, manually delete the resources associated with the error, and reinstall the chart or add-on.

  1. Check the error message to identify the resource causing the conflict. Pay attention to the information after "Unable to continue with install:".

    For example:

    create release failed: create release failed {"error":{"message":"Create release by helm failed:rendered manifests contain a resource that already exists. Unable to continue with install: ClusterRole \"cceaddon-nginx-ingress\" 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 \"kube-system\": current value is \"example\"","code":"SVCSTG.CCECAM.5000208"}}
    • Conflicting resource: ClusterRole named cceaddon-nginx-ingress, which does not belong to any namespace (ClusterRoles are not namespace-level resources.)
    • Conflicting field: metadata.annotations.meta.helm.sh/release-namespace
      • Expected value: kube-system
      • Actual value: example

  2. Run the following kubectl command to delete the conflicting resource in the cluster: (The command here is only an example. Delete the resources based on the error message.)

    kubectl delete clusterRole cceaddon-nginx-ingress

  3. After the resource conflict is resolved, reinstall the chart or add-on. If the conflict message reappears, repeat the process.