Rolling Back Revisions

Every install and upgrade is a numbered revision; helm rollback returns a release to any previous revision.

Syntaxhelm rollback <release> <revision>

Because Helm records every change as a numbered revision, undoing a bad deploy is one command.

See the history

helm history <release> lists all revisions with their status and description.

Roll back

helm rollback <release> <revision> restores that revision. Rolling back itself creates a new revision — history is never rewritten, only appended.

Omit the revision number to roll back to the immediately previous one.

Release revisions advance with each upgrade and rollback creates a new revisionv1v2v3bad deployv4rollback to v2history grows
Rolling back v3 to v2 produces a new revision v4 — history only moves forward.

Example

Example · bash
# Review the revision history
helm history my-web

# Roll back to revision 2
helm rollback my-web 2

# Roll back to the previous revision (no number needed)
helm rollback my-web

When to use it

  • An operator rolls back a broken production release to the last known-good revision within seconds after a bad upgrade causes 500 errors.
  • A developer rolls back a chart version upgrade that introduced a schema change incompatible with the current database, restoring service while the fix is prepared.
  • A platform team tests rollback in staging as part of their release checklist, verifying helm rollback leaves all resources in the expected state before approving production.

More examples

View history then rollback

Shows all revisions for a release, then rolls back to revision 3, creating a new revision that mirrors that state.

Example · bash
helm history my-app -n production
helm rollback my-app 3 -n production

Rollback to previous revision

Rolls back the release by one revision when no revision number is given, the quickest recovery after a bad upgrade.

Example · bash
# Omitting the revision number rolls back to the previous revision
helm rollback my-app -n production

Rollback and wait for ready

Performs the rollback and blocks until all rolled-back resources report ready, confirming recovery before returning.

Example · bash
helm rollback my-app 2 \
  --wait --timeout 5m \
  -n production

Discussion

  • Be the first to comment on this lesson.