...

/

Rollback Helm Release

Rollback Helm Release

Learn how to mitigate an erroneous Helm chart.

Rollback the Helm release

Helm keeps a history of all releases. It’s not only for auditing purposes; we can also easily roll back back to a previous version. And this is a very powerful feature of Helm, which can be very handy in case of a big problem in the production system when a new version of our application is not working as expected.

Rollback to a previous release

To roll back to a previous release, we can use the helm rollback command. But first, let’s check the current status of the dashboard release:

Press + to interact
helm status dashboard -n monitoring

Here is what the output will be:

NAME: dashboard
LAST DEPLOYED: Sun Dec  5 15:29:30 2021
NAMESPACE: monitoring
STATUS: failed
REVISION: 3
TEST SUITE: None

It’s  revision number 3, and has the status failed.

Note: If we test everything in the web sandbox and we’ve made a break after the last lesson we might not have the same output as it’s described here. For example, our revision might not be the 4th, like it’s above.

Now, let’s roll back to a previous one:

Press + to interact
helm rollback dashboard -n monitoring

The output will be as follows:

Rollback was a success! Happy Helming!

Great! It says that it finished with success! Let’s see the status of a current release:

Press + to interact
helm status dashboard -n monitoring

The output will be as follows:

NAME: dashboard
LAST DEPLOYED: Sun Dec  5 15:38:25 2021
NAMESPACE:
...