Helm rollback to previous release

前端 未结 5 522
花落未央
花落未央 2021-02-05 03:38

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 &

相关标签:
5条回答
  • 2021-02-05 03:55

    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>

    0 讨论(0)
  • 2021-02-05 03:56

    Below are the steps you can rollback Using Helm:

    1. Check the name of a release and (version) number using $ helm ls
    2. The first argument of the rollback command is the name of a release, and the second is a revision (version) number.
    $ helm rollback RELEASE [REVISION]
    
    0 讨论(0)
  • 2021-02-05 04:02

    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

    0 讨论(0)
  • 2021-02-05 04:12

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

    helm rollback <RELEASE> 0
    
    0 讨论(0)
  • 2021-02-05 04:15

    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

    0 讨论(0)
提交回复
热议问题