Helm rollback to previous release

2020-05-25 04:11发布

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.

3条回答
Luminary・发光体
2楼-- · 2020-05-25 04:32

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

查看更多
祖国的老花朵
3楼-- · 2020-05-25 04:38

Using Helm

helm rollback release-name 0

Using kubectl

kubectl rollout undo deployment/deployment-name

or

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

查看更多
干净又极端
4楼-- · 2020-05-25 04:42

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

helm rollback <RELEASE> 0
查看更多
登录 后发表回答