How would you run integration tests against a chart in CI with a real cluster?
IntermediateScenarioHooks, Migrations & Testing
Answer
Situation read → Unit-level checks pass, but you want proof that it installs and works.
What I'd do →
- Create an ephemeral kind cluster in the job (
helm/kind-actionin GitHub Actions). - Load images with
kind load docker-image. helm install --wait --timeout 5mwith CI values;helm test --logs.- Also test upgrade from the previously released chart version to this one, and a rollback.
- Or use chart-testing (
ct lint-and-install --upgrade), which does install and upgrade tests for changed charts.
Why → Install and upgrade paths fail in different ways; test both.
Interview tip → Mention ct (chart-testing) and upgrade testing.
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