Interview Prep/Helm/Hooks, Migrations & Testing

You want a backup before every production upgrade. How do you do it with Helm?

IntermediateScenarioHooks, Migrations & Testing
Answer

Situation read → The backup must finish before the migration runs.

What I'd do →

  1. pre-upgrade Job with weight -10 running pg_dump to S3 (or triggering a Velero/RDS snapshot), using IRSA or Pod Identity for credentials.
  2. Migration Job at weight 0.
  3. Enable it only in prod via backup.enabled.
  4. Alert if the backup Job fails; it fails the upgrade by design.

Why → Hook weights give strict ordering: backup, then migrate, then roll out.

Interview tip → Mention verifying restores periodically; a backup never restored is a hope.

All Helm questions Roadmap: Helm

More on Hooks, Migrations & Testing