What are common rollback strategies in CI/CD?
Answer
Rollback strategies allow you to quickly revert a bad deployment. Re-deploy the previous artifact: since CI/CD stores every build artifact (Docker image tagged by git SHA), you can re-trigger the pipeline with the previous tag. This is reliable but takes minutes. Blue-green rollback: if a blue-green deployment is used, the load balancer simply switches back to the old (blue) environment — near-instant, since the old environment is still running. Kubernetes rollback: kubectl rollout undo deployment/my-service reverts to the previous ReplicaSet in seconds. Feature flags: turn off the problematic feature flag immediately without any deployment. Git revert: create a revert commit and let the pipeline redeploy — cleaner for long-term code history but the slowest option. Fast rollback capability is a prerequisite for high-frequency deployment confidence.
Previous
What is an approval gate in a CD pipeline?
Next
What does a basic CI pipeline look like for Node.js, Python, Java, and PHP projects?