Interview Prep/Kubernetes/Helm, operators and GitOps

What are Helm hooks and give an example.

BeginnerScenarioHelm, operators and GitOps
Answer

Situation read → A DB migration must run before upgrade.

What I'd do →

  1. Add annotation "helm.sh/hook": pre-upgrade to a Job
  2. Add "helm.sh/hook-delete-policy": before-hook-creation
  3. Set weights for ordering
  4. Watch the hook with kubectl get jobs
  5. Remember hooks are not part of the release manifest

Why → Hooks run at lifecycle points like pre-install and post-upgrade.

Interview tip → Mention test hooks with helm test.

All Kubernetes questions Roadmap: Platform engineering

More on Helm, operators and GitOps