Rollback strategy¶
A Rollback strategy is a risk mitigation approach used in software deployment to revert a system to its previous stable state in the event of a failure or critical issue following an update.^[400-devops-06-kubernetes-k8s-ithelp-day14-readme.md]
In environments utilizing container orchestration like Kubernetes, rollbacks are often integrated into the deployment workflow.^[400-devops-06-kubernetes-k8s-ithelp-day14-readme.md] When a new version (e.g., v2) fails validation or causes errors, the strategy ensures that the system can quickly revert traffic and resources back to the last known healthy version (e.g., v1) to minimize downtime.^[400-devops-06-kubernetes-k8s-ithelp-day14-readme.md]
Implementation¶
Rollback mechanisms can be automated or manual, depending on the deployment strategy in use:
- Automated Rollback: In strategies like Blue/Green Deployment, the rollback process can be nearly instantaneous.^[400-devops-06-kubernetes-k8s-ithelp-day14-readme.md] Because the previous environment (
v1) is often kept running or paused alongside the new version (v2), reverting simply involves switching the traffic routing—such as updating a Service'slabel selector—back to the original version.^[400-devops-06-kubernetes-k8s-ithelp-day14-readme.md] - Resource Management: A complete rollback strategy typically involves not just redirecting traffic, but also scaling down or terminating the faulty deployment to free up resources.^[400-devops-06-kubernetes-k8s-ithelp-day14-readme.md]
Related Concepts¶
- Blue/Green Deployment
- [[Deployment]]
- Documentation Workflow
Sources¶
^[400-devops-06-kubernetes-k8s-ithelp-day14-readme.md]