Interview Prep/Helm/Hooks, Migrations & Testing

How do you clean up external resources (DNS records, S3 buckets) when a release is uninstalled?

AdvancedScenarioHooks, Migrations & Testing
Answer

Situation read → Helm deletes Kubernetes objects only.

What I'd do →

  1. Prefer controllers that own lifecycle: external-dns removes records when the Ingress disappears; Crossplane/ACK delete cloud resources when their CRs are deleted.
  2. If unavoidable, a pre-delete Job that runs a cleanup script with scoped IAM.
  3. Add helm.sh/hook-delete-policy: hook-succeeded and a timeout; document that a failed hook blocks uninstall (--no-hooks skips it).

Why → Controllers reconcile; one-shot hooks can fail and leak resources.

Interview tip → Prefer reconciliation over imperative hooks.

All Helm questions Roadmap: Helm

More on Hooks, Migrations & Testing