Skip to content
Latchkey

helm rollback: Revert Releases in CI

Roll a release back to a previous revision from its history.

helm rollback restores a release to an earlier revision recorded in its history. In CI it is the manual or automated rescue when a deploy goes bad and you are not using --atomic. Use helm history to find the revision to roll back to.

Common flags

  • RELEASE [REVISION] - release and target revision (0/omitted = previous)
  • -n NAMESPACE - release namespace
  • --wait --timeout=DURATION - block until rolled-back resources are ready
  • helm history RELEASE - list revisions to choose from

Example in CI

Roll back to the previous good revision.

shell
helm rollback api 0 -n prod --wait --timeout 300s

Common errors in CI

  • Error: release: not found - wrong release name or namespace
  • Error: ... has no deployed releases - release never reached a deployed state
  • Error: ... revision ... not found - target revision out of range or pruned

Key takeaways

  • Reverts a release to a prior revision from its history.
  • Use helm history to pick the revision; 0 means the previous one.
  • Prefer --atomic upgrades to make rollback automatic on failure.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →