How to Rollback A Helm Release?

8 minutes read

To rollback a Helm release, you can follow these steps:

  1. Verify the status of the current release using the helm list command. Identify the release name and revision number you want to rollback to.
  2. Use the helm history RELEASE_NAME command to view the revision history of the release. Note the revision number that corresponds to the desired version you want to rollback to.
  3. Execute the rollback command: helm rollback RELEASE_NAME REVISION_NUMBER. Replace RELEASE_NAME with the name of your release and REVISION_NUMBER with the revision number you want to go back to.
  4. Wait for the rollback to complete and verify the release status again using helm list. The status should display the rolled-back revision.
  5. If you want to roll back to a specific version but keep the possibility to rollback further, you can use the --recreate-pods flag: helm rollback --recreate-pods RELEASE_NAME REVISION_NUMBER. This recreates the pods in your deployment.


By following these steps, you can efficiently rollback a Helm release to a previous version, ensuring better control over your deployments.

Best Kubernetes Books to Read in 2024

1
Kubernetes: Up and Running: Dive into the Future of Infrastructure

Rating is 5 out of 5

Kubernetes: Up and Running: Dive into the Future of Infrastructure

2
Kubernetes in Action

Rating is 4.9 out of 5

Kubernetes in Action

3
The Book of Kubernetes: A Complete Guide to Container Orchestration

Rating is 4.8 out of 5

The Book of Kubernetes: A Complete Guide to Container Orchestration

4
The Kubernetes Operator Framework Book: Overcome complex Kubernetes cluster management challenges with automation toolkits

Rating is 4.7 out of 5

The Kubernetes Operator Framework Book: Overcome complex Kubernetes cluster management challenges with automation toolkits

5
Kubernetes: Up and Running: Dive into the Future of Infrastructure

Rating is 4.6 out of 5

Kubernetes: Up and Running: Dive into the Future of Infrastructure

6
Kubernetes Cookbook

Rating is 4.5 out of 5

Kubernetes Cookbook

7
Mastering Kubernetes - Fourth Edition: Dive into Kubernetes and learn how to create and operate world-class cloud-native systems

Rating is 4.4 out of 5

Mastering Kubernetes - Fourth Edition: Dive into Kubernetes and learn how to create and operate world-class cloud-native systems

8
Mastering Kubernetes: Level up your container orchestration skills with Kubernetes to build, run, secure, and observe large-scale distributed apps, 3rd Edition

Rating is 4.3 out of 5

Mastering Kubernetes: Level up your container orchestration skills with Kubernetes to build, run, secure, and observe large-scale distributed apps, 3rd Edition


What is the command to view the complete revision history of a Helm release?

The command to view the complete revision history of a Helm release is:

1
helm history <release-name>


Replace <release-name> with the name of the Helm release you want to see the revision history for.


What is the default rollback limit in Helm?

The default rollback limit in Helm is 10. This means that Helm will keep a maximum of 10 previous releases of a chart. If you attempt to roll back more than 10 releases, the oldest release will be deleted to accommodate the new release.


What is the significance of Helm rollback annotations?

Helm rollback annotations are used to manage and track the history of a Helm release's rollback operations. When a rollback is performed on a Helm release, Helm automatically sets a set of annotations on the release to reflect the rollback operation.


These annotations serve multiple purposes:

  1. Audit Trail: Rollback annotations provide an audit trail of all the rollback events performed on a Helm release. They capture information such as the rollback revision number, rollback time, and the user who initiated the rollback.
  2. Versioning and Tracking: By annotating the rollback events, Helm allows for easy versioning and tracking of a release. Each rollback operation creates a new revision, which can be referenced and examined later. This helps in troubleshooting and understanding the history of a release.
  3. Custom Actions: Helm rollback annotations can be utilized to trigger custom actions or automation upon rollback. For example, a rollout notification or alert can be triggered whenever a rollback occurs by monitoring the corresponding annotation changes.
  4. Insights and Metrics: By analyzing the rollback annotations, it is possible to gather insights and metrics about the stability and success of deployments. The frequency and reasons for rollbacks can be measured, enabling teams to identify patterns and address recurring issues.


Overall, Helm rollback annotations enhance observability, traceability, and manageability of deployments by capturing and preserving important information related to rollback operations on Helm releases.

Facebook Twitter LinkedIn Telegram Whatsapp Pocket

Related Posts:

To use MongoDB in Helm deployment, you need to follow these steps:First, ensure that Helm is installed and configured in your Kubernetes cluster. Add the Bitnami Helm chart repository to your Helm configuration using the command: helm repo add bitnami https://...
To access Helm programmatically, you can follow these steps:Import the required Python packages: import subprocess import yaml Define the Helm command structure: helm_command = [ &#39;helm&#39;, # The Helm executable command &#39;install&#39;, # The Helm actio...
To install a Helm chart, you need to follow these steps:Ensure that Helm is installed on your system. Helm is a package manager for Kubernetes that simplifies the deployment and management of applications. Add the necessary repository where the Helm chart is l...