Lesson 11 · Secrets, scale & operations
Upgrade, rollback & releases
Every deploy is a numbered revision — so you can see history, roll back, and fail safely.
Your win: explain release revisions and history, how rollback
and --atomic work, and how this repo's Skaffold-driven, GitOps-ish model relates
to manual Helm rollback.
Revisions — the release's undo history
Every helm install/upgrade creates a new numbered
revision of the release, and Helm keeps the history (in those in-cluster
Secrets from Lesson 1).1 That history is what makes
Helm more than "kubectl apply with templates" — it's an account of what was deployed,
when.
| Command | Does |
|---|---|
helm history <rel> | list revisions (chart version, status, timestamp) |
helm rollback <rel> <rev> | create a new revision that restores an old one |
helm get manifest/values <rel> | see exactly what's deployed now |
helm upgrade --atomic --wait | auto-roll-back if the upgrade fails to become ready |
helm rollback bob 4 doesn't delete revisions 5+; it applies the contents
of revision 4 as a new revision (say, 6). History is append-only — you can always
see that a rollback happened. And --atomic is the safety net: if a
--wait upgrade doesn't reach ready, Helm rolls it back for you automatically
instead of leaving a half-broken release.
How this repo actually rolls back
helm by hand here — each skaffold run is a
helm upgrade --install (Lesson 8), so revisions accrue per service per env×org
namespace. The per-service release sets wait: true + statusCheck: true
(backend/bob/skaffold.yaml:24), so a deploy blocks until the
rollout is healthy (readiness probes, Course 2 L8) — the same "don't call it done until it's
ready" guarantee --atomic --wait gives.
helm rollback. That keeps git as the single source of truth: the cluster is
whatever the last deploy rendered, and to change it you change git and redeploy. Manual
helm rollback still works for emergencies, but it makes the cluster diverge from
git until the next deploy reconciles it. (This is the deploy philosophy; the CI/CD
course covers the machinery.)
kubectl edits a live
object, it stays changed until the next skaffold run overwrites it. "The chart
says X but the cluster runs Y" is real; helm get manifest vs the rendered chart
is how you catch it.
Helm docs — helm upgrade / rollback / history
Revisions, the rollback semantics, and the --atomic/--wait flags.
Check yourself (from memory)
Q1. helm rollback bob 4…
Q2. helm upgrade --atomic --wait will…
Q3. In this repo, the usual way to "roll back" is…
helm rollback works but diverges from git.
helm history lists them; helm rollback rel rev
restores an old revision's contents as a NEW revision (append-only — you see it happened);
helm get manifest shows what's live; --atomic --wait auto-reverts a
failed upgrade. REPO: each skaffold run = helm upgrade --install
(revisions accrue per service×env×org); wait:true+statusCheck block
until healthy. Rollback in practice = REDEPLOY prior state from GIT via CI (git = source of
truth), not manual helm rollback. DRIFT: push-based (not continuous GitOps), so a
live kubectl edit persists until the next deploy overwrites it.