Skip to content
Latchkey

Helm "rendered manifests contain a resource that already exists" in CI

Helm refuses to overwrite resources it does not own. This error means a manifest in the chart matches an existing object that was created outside this release (manually, by another release, or by a prior failed install) and lacks the ownership metadata Helm expects.

What this error means

helm install/upgrade fails with Error: rendered manifests contain a resource that already exists. Unable to continue with install: <Kind> "<name>" in namespace "<ns>" exists and cannot be imported into the current release: invalid ownership metadata.

helm
Error: rendered manifests contain a resource that already exists. Unable to
continue with install: ConfigMap "api-config" in namespace "prod" exists and
cannot be imported into the current release: invalid ownership metadata

Common causes

Object created outside the release

The resource was applied manually or by a different release/tool, so Helm sees a conflicting unowned object.

Leftover from a failed install

A prior failed install created the object without completing release ownership.

How to fix it

Adopt the resource into the release

Label/annotate the existing object with Helm ownership metadata so it can be imported.

Terminal
kubectl annotate configmap api-config -n prod \
  meta.helm.sh/release-name=api meta.helm.sh/release-namespace=prod --overwrite
kubectl label configmap api-config -n prod \
  app.kubernetes.io/managed-by=Helm --overwrite

Or remove/realign the conflict

  1. If the object is stale, delete it and let Helm create it.
  2. Ensure only one release/tool manages the object going forward.
  3. Re-run the install/upgrade.

How to prevent it

  • Manage each object with exactly one release/tool.
  • Do not pre-create chart-managed resources manually.
  • Clean up failed installs before retrying.

Frequently asked questions

What causes ""resource that already exists""?
The resource was applied manually or by a different release/tool, so Helm sees a conflicting unowned object.
How do I fix "resource that already exists"?
Label/annotate the existing object with Helm ownership metadata so it can be imported.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card