A migration hook failed and the Job pod was deleted, so you cannot see why. How do you fix the chart?
BeginnerScenarioHooks, Migrations & Testing
Answer
Situation read → hook-delete-policy included hook-failed, or the Job had ttlSecondsAfterFinished too low.
What I'd do →
- Use
before-hook-creation,hook-succeeded(nohook-failed) so failed Jobs remain. - Ship hook logs to the central logging stack so they survive deletion.
- In CI, on failure, run
kubectl logs job/shop-migrate -n shop --all-containersbefore anything else.
Why → Failed hooks are the ones you need to inspect.
Interview tip → Know the three delete policies and which to omit.
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?IntermediateYou want a backup before every production upgrade. How do you do it with Helm?IntermediateA `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