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.
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.
Unlike the previous old answers above.
According to the latest documentation, you can rollback to the previous version by simply omitting the argument in helm rollback
. Which means your command should like below to rollback to the previous version.
helm rollback <RELEASE_NAME>
But if you need to rollback to specific previous version, You can:
First: List revision numbers by running helm history <RELEASE_NAME>
Second: Roll back to the version you want using helm rollback <RELEASE> [REVISION]
As it turns out, there is an undocumented option to rollback to the previous release by defining the target release version as 0.
like: helm rollback <RELEASE> 0
Unlike the previous old answers above.
According to the latest documentation, you can rollback to the previous version by simply omitting the argument in helm rollback
. Which means your command should like below to rollback to the previous version.
helm rollback <RELEASE_NAME>
But if you need to rollback to specific previous version, You can:
First: List revision numbers by running helm history <RELEASE_NAME>
Second: Roll back to the version you want using helm rollback <RELEASE> [REVISION]
If you just want to rollback to the previous release, you can do
helm rollback <RELEASE> 0
Using Helm
helm rollback release-name 0
Using kubectl
What does rollout/rollback in kubectl means? Rolling updates allow the following actions:
kubectl rollout undo deployment/deployment-name
or
kubectl rollout undo deployment/deployment-name --to-revision=0
kubectl
this way will rollback only the deployment, but not other resources associated with helm release. –
Enlarger Below are the steps you can rollback Using Helm:
$ helm ls
$ helm rollback RELEASE [REVISION]
You can simply do -
helm rollback <release-name> <release version> -n <namespace>
In helm3 namespace is required, whereas in lower version, you can do below -
helm rollback <release-name> <release version>
I can add a couple of steps that always help.
helm -n namespace list
to get all releases, in case you don't have the whole name, you can even filter if needed helm -n integration list | grep text-to-filter-by
helm -n namespace history release-name
. You will get [REVISION, UPDATED, STATUS, CHART, APP VERSION, DESCRIPTION]helm -n namespace rollback release-name REVISION
© 2022 - 2024 — McMap. All rights reserved.