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 →
pre-upgradeJob with weight-10runningpg_dumpto S3 (or triggering a Velero/RDS snapshot), using IRSA or Pod Identity for credentials.- Migration Job at weight
0. - Enable it only in prod via
backup.enabled. - 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.
More on Hooks, Migrations & Testing
Design database migrations for a Helm-deployed app where the database is a subchart.IntermediateThe migration Job takes 12 minutes on prod data and the upgrade times out. What do you change?IntermediateA migration hook failed and the Job pod was deleted, so you cannot see why. How do you fix the chart?BeginnerA `post-install` hook seeds demo data; it ran again on every upgrade and duplicated rows. Why?IntermediateHow do you clean up external resources (DNS records, S3 buckets) when a release is uninstalled?AdvancedWhat would you put in `helm test` for a 3-tier app?Intermediate