Middle
How to rollback a release in Helm?
sobes.tech AI
Answer from AI
The command used for rollback in Helm is helm rollback.
Command syntax:
// Rollback to the previous version
helm rollback <release_name>
// Rollback to a specific version
helm rollback <release_name> <revision_number>
Where:
<release_name>- the name of the Helm release to rollback.<revision_number>(optional) - the revision number to which to revert. If not specified, it will rollback to the previous revision.
Example of rollback to the previous version:
helm rollback my-release
Example of rollback to revision 3:
helm rollback my-release 3
After executing the command, Helm will revert the release to the specified revision, deleting or modifying resources in the Kubernetes cluster according to the manifests from that revision.
Important: It is recommended to ensure that the previous revision is working and does not contain critical errors before rollback. You can preview the revision history using helm history <release_name>.