What would you put in `helm test` for a 3-tier app?
IntermediateScenarioHooks, Migrations & Testing
Answer
Situation read → Tests should prove the deployed wiring works.
What I'd do →
- Test Pod 1:
curl -fsS http://<release>-api:3000/readyz(API up, DB reachable). - Test Pod 2:
curl -fsS http://<release>-frontend:8080/api/items(frontend proxies to API). - Test Pod 3 (optional):
psql -c 'select 1 from items limit 1'(migration applied). - Run
helm test shop --logsin CI right after upgrade.
Why → Each test validates one hop of the request path.
Interview tip → Map tests to hops in the architecture.
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