Helm Release Lifecycle: Install, Upgrade, Rollback, History
Fast recall
Quick revision
Core answer
helm upgrade --install is idempotent (installs if absent, upgrades if present). --atomic rolls back on failure. helm history lists all revisions; helm rollback REVISION reverts to a previous version including all manifests. Hooks (pre-install, post-upgrade) run ordered Jobs for DB migrations. helm get manifest/values/hooks retrieves exactly what was applied. This is why Helm beats raw kubectl apply — the release record enables safe, audited rollback.Whether you understand Helm as a release manager with history, not just a templating tool
Running `helm install` twice (errors on existing release) instead of `helm upgrade --install`, or skipping `--atomic` so failed upgrades leave a half-applied state
Explain hooks and weights, how rollback reverts all manifests not just image, the 3-way merge patch, `revisionHistoryLimit`, secret-based state, Helm 3 removal of Tiller, and how GitOps tools layer on top
Interview-ready guide
Interview answer
Helm is more than a templating tool — it's a release manager. Every helm install or upgrade creates a release record stored as a Kubernetes Secret in the target namespace, containing the rendered manifests, the merged values, and the status. This record is what makes helm history, helm rollback, and helm get manifest work without any external database.
The CI pattern
helm upgrade --install order-svc ./chart -f values-prod.yaml --set image.tag=$SHA --atomic --timeout 5m --wait.--installmakes it idempotent — install if absent, upgrade if present — safe to run every deploy.--atomicis the most important flag — if apply or readiness wait fails, Helm rolls back to the previous revision; the cluster is never in a half-applied state.--waitblocks until all resources are Ready;--timeout 5msets the ceiling.
History and rollback
helm history order-svclists every revision with status: deployed, superseded, failed.helm rollback order-svc 3reverts to revision 3 — re-applies the Deployment, Service, ConfigMap as they were at that revision. Creates a new revision (e.g., 7) that mirrors 3.helm get manifest order-svc --revision 3shows exactly what was applied at that point — essential for incident reviews.- What rollback does NOT do: reverse hook side-effects (DB migrations) or restore external data. Design migrations to be forward-compatible so a rollback of manifests doesn't leave DB schema orphaned.
Hooks for migrations
- Jobs annotated
helm.sh/hook: pre-upgraderun before the new manifests apply; use for DB migrations. helm.sh/hook-weightorders hooks; low runs first.helm.sh/hook-delete-policy: before-hook-creation,hook-succeededcleans up Job history.helm testruns test-annotated pods post-deploy for smoke tests.
Why Helm beats raw kubectl apply
- kubectl apply has no history — you rely on Git to know what was applied, and nothing prevents drift between Git and cluster.
- Helm stores the actual applied manifests per revision, so rollback works even if Git is gone.
--atomicgives safe failure handling that raw apply cannot match.
Interaction with GitOps
- ArgoCD can deploy Helm charts but often uses
helm templatemode — it renders and applies itself, sohelm historyis empty; rollback = Git revert. - Flux Helm Controller uses real Helm releases — native
helm historyand rollback are preserved. - In strict GitOps shops Git is the source of truth — manual
helm rollbackdiverges and gets reverted by the GitOps controller.
Common gotchas
- CRDs in the
crds/folder are install-only — upgrades don't touch them and rollback doesn't revert them. - Don't kubectl-edit Helm-managed resources — your edits vanish on next upgrade because of 3-way merge.
revisionHistoryLimitcaps retained revisions; raise for frequent-deploy services to have a longer rollback window.
Helm Release Lifecycle: Install, Upgrade, Rollback, History
Direct Answer
Helm tracks each deployment as a release — a versioned record stored as a Kubernetes Secret in the target namespace. helm upgrade --install is idempotent (installs if absent, upgrades if present). --atomic rolls back on failure. helm history lists all revisions; helm rollback REVISION reverts to a previous version including all manifests. Hooks (pre-install, post-upgrade) run ordered Jobs for DB migrations. helm get manifest/values/hooks retrieves exactly what was applied. This is why Helm beats raw kubectl apply — the release record enables safe, audited rollback.
Common Mistakes & Pitfalls
Running helm install twice (errors on existing release) instead of helm upgrade --install, or skipping --atomic so failed upgrades leave a half-applied state
Check your understanding
Answer these without looking back at the article.
- What is the difference between `--atomic` and `--wait`?
- How does Helm's 3-way merge patch work, and what does it protect?
- Why doesn't `helm rollback` reverse a DB migration hook?
- How does ArgoCD's Helm support differ from Flux's Helm Controller?
Related interview prep categories
2Looking for a structured roadmap?
Every module on this page is also part of the full Java backend interview track.