Created
September 20, 2023 18:07
-
-
Save keyan1603/6526c8b94f3c2be5ea1367ecb052d3a1 to your computer and use it in GitHub Desktop.
Revert to Previous release – Disaster recovery in Kubernetes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Revert to previous deployment | |
kubectl rollout undo deployments/<deployment name> | |
#Example: To revert CD deployment to the previous state | |
kubectl rollout undo deployments/cd | |
# To get the Revisions which were deployed | |
kubectl rollout history deployment/<deployment name> | |
#Example: To get the Revision history of CM | |
kubectl rollout history deployment/cm | |
# To get the detail of the Revision rolled out | |
kubectl rollout history deployment/<deployment name> --revision=<revision number> | |
#Example: To get the details of the specific Revision history | |
kubectl rollout history deployment/cm --revision=75 | |
# Revert to Specific deployment Revision | |
kubectl rollout undo deployment/<deployment name> --to-revision=<revision number> | |
#Example: To revert to specific Revision version | |
kubectl rollout undo deployment/cm --to-revision=75 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment