Interview Prep/Helm/Hooks, Tests & Validation

What are Helm hooks?

BeginnerConceptHooks, Tests & Validation
Answer

Hooks are normal manifests (usually Jobs) annotated with helm.sh/hook that Helm runs at specific points in the release lifecycle instead of applying them with the rest of the chart. Typical uses: database migrations before an upgrade, backups before uninstall, cache warmup after install, smoke tests.

metadata:
  annotations:
    "helm.sh/hook": pre-upgrade
    "helm.sh/hook-weight": "0"
    "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
All Helm questions Roadmap: Helm

More on Hooks, Tests & Validation