Rolling Back Releases

1. Rolling Back Release

Example: Roll back to previous revision

helm rollback api          # to immediately preceding revision
helm rollback api 5        # to specific revision number

2. Rolling Back to Revision

CommandBehavior
helm history apiList revisions to pick from
helm rollback api 3Recreates manifests from revision 3; bumps revision to N+1

3. Viewing Release History

FieldMeaning
REVISIONMonotonic counter
UPDATEDTimestamp of action
STATUSdeployed, superseded, failed, uninstalled
CHARTChart + version installed
APP VERSION.Chart.AppVersion at that point

4. Understanding Rollback Behavior

BehaviorDetail
Manifests restoredFrom stored Helm Secret for target revision
CRDsNOT rolled back
PVCsRetained unless explicitly deleted
External resources (cloud LBs)Re-applied; may change addresses

5. Using Atomic Rollback

FlagEffect
--atomicWait for Ready; on failure, auto-rollback to pre-rollback revision

6. Forcing Rollback

FlagBehavior
--forceRecreate resources where patching fails
--no-hooksSkip pre/post-rollback hooks
--recreate-pods REMOVEDRemoved in Helm 3

7. Setting Rollback Timeout

FlagDefault
--timeout5m
--waitBlock until resources Ready

8. Waiting for Rollback Completion

Example: Safe rollback

helm rollback api 5 --atomic --wait --timeout 10m

9. Cleaning Up on Failed Rollback

FlagBehavior
--cleanup-on-failDelete newly created resources on failure

10. Troubleshooting Failed Rollbacks

IssueResolution
Release stuck pending-rollbackManually patch Helm Secret: kubectl patch secret sh.helm.release.v1.X.vN -p '{"metadata":{"labels":{"status":"deployed"}}}'
Immutable field changedUse --force to recreate, or migrate manually
Hook timeoutIncrease --timeout or add --no-hooks
CRD schema driftRoll back CRD manifests manually first