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
| Command | Behavior |
|---|---|
helm history api | List revisions to pick from |
helm rollback api 3 | Recreates manifests from revision 3; bumps revision to N+1 |
3. Viewing Release History
| Field | Meaning |
|---|---|
| REVISION | Monotonic counter |
| UPDATED | Timestamp of action |
| STATUS | deployed, superseded, failed, uninstalled |
| CHART | Chart + version installed |
| APP VERSION | .Chart.AppVersion at that point |
4. Understanding Rollback Behavior
| Behavior | Detail |
|---|---|
| Manifests restored | From stored Helm Secret for target revision |
| CRDs | NOT rolled back |
| PVCs | Retained unless explicitly deleted |
| External resources (cloud LBs) | Re-applied; may change addresses |
5. Using Atomic Rollback
| Flag | Effect |
|---|---|
--atomic | Wait for Ready; on failure, auto-rollback to pre-rollback revision |
6. Forcing Rollback
| Flag | Behavior |
|---|---|
--force | Recreate resources where patching fails |
--no-hooks | Skip pre/post-rollback hooks |
--recreate-pods REMOVED | Removed in Helm 3 |
7. Setting Rollback Timeout
| Flag | Default |
|---|---|
--timeout | 5m |
--wait | Block until resources Ready |
8. Waiting for Rollback Completion
9. Cleaning Up on Failed Rollback
| Flag | Behavior |
|---|---|
--cleanup-on-fail | Delete newly created resources on failure |
10. Troubleshooting Failed Rollbacks
| Issue | Resolution |
|---|---|
Release stuck pending-rollback | Manually patch Helm Secret: kubectl patch secret sh.helm.release.v1.X.vN -p '{"metadata":{"labels":{"status":"deployed"}}}' |
| Immutable field changed | Use --force to recreate, or migrate manually |
| Hook timeout | Increase --timeout or add --no-hooks |
| CRD schema drift | Roll back CRD manifests manually first |