Helm rollback to previous release

8/17/2018

I am looking for a way to rollback a helm release to its previous release without specifying the target release version as a number.

Something like helm rollback <RELEASE> ~1 (like git reset HEAD~1) would be nice.

-- onkeliroh
kubernetes
kubernetes-helm

3 Answers

8/17/2018

As it turns out, there is an undocumented option to rollback to the last successful release by defining the target release version as 0. like: helm rollback <RELEASE> 0

Source: https://github.com/helm/helm/issues/1796

-- onkeliroh
Source: StackOverflow

8/17/2018

If you just want to rollback to the previous release, you can do

helm rollback <RELEASE> 0
-- MtTracer
Source: StackOverflow

1/2/2020

Using Helm

helm rollback release-name 0

Using kubectl

What does rollout/rollback in kubectl means? Rolling updates allow the following actions:

  1. Promote an application from one environment to another (via container image updates).
  2. Rollback to previous versions.
  3. Continuous Integration and Continuous Delivery of applications with zero downtime.

kubectl rollout undo deployment/deployment-name

or

kubectl rollout undo deployment/deployment-name --to-revision=0

-- redzack
Source: StackOverflow