Interview Prep/Helm/Install & Upgrade Failures

`Error: INSTALLATION FAILED: Unable to continue with install: CustomResourceDefinition "certificates.cert-manager.io" 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 "cert-manager": current value is "kube-system"`

AdvancedTroubleshootingInstall & Upgrade Failures
Answer

Likely causes → A previous installation of the same software in another namespace (or another release) owns the cluster-scoped CRDs.

Diagnose →

kubectl get crd certificates.cert-manager.io -o yaml | yq '.metadata.annotations, .metadata.labels'
helm list -A | grep cert-manager

Fix → Decide the single owner. Either uninstall the old release first (careful: deleting CRDs deletes all Certificates), or re-annotate the CRDs to the new release, or install the chart with CRD installation disabled (crds.enabled=false / installCRDs=false) and manage CRDs separately.

Prevent → Cluster-wide components are installed once by the platform team; CRDs managed in their own pipeline.

All Helm questions Roadmap: Helm

More on Install & Upgrade Failures