Your hook Job never completes because Istio's sidecar keeps the pod running. How do you fix it?
AdvancedScenarioHooks, Migrations & Testing
Answer
Situation read → The main container exits, but the injected istio-proxy keeps running, so the Job never reaches Complete and Helm waits until timeout.
What I'd do →
- With native sidecars (Kubernetes 1.29+, Istio configured to use them), the proxy stops automatically when the main container ends.
- Otherwise disable injection for the hook:
sidecar.istio.io/inject: "false"on the pod template if it does not need the mesh. - Or call
curl -X POST localhost:15020/quitquitquitat the end of the script.
Why → Jobs complete only when all containers exit.
Interview tip → Mention native sidecars as the modern fix.
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?BeginnerYou 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?Advanced