What is a rolling deployment and how does it compare to blue-green?
Answer
A rolling deployment gradually replaces old version instances with new version instances one (or a few) at a time. Kubernetes performs rolling deployments by default: it spins up new pods with the new image, waits for them to pass readiness checks, then terminates old pods — ensuring a minimum number of healthy pods are always running. Compared to blue-green: rolling deployments use less infrastructure (no duplicate environment) but both old and new versions run simultaneously during the rollout, requiring backward-compatible APIs and database schemas. Rolling back a rolling deployment is slower than blue-green because you must roll forward through all instances again. Rolling deployments are the default in Kubernetes and work well when the service is stateless and API changes are backward-compatible. Blue-green is preferred when you need atomic, instant switches and can afford the infrastructure cost.
Previous
What is a canary release and how does it reduce deployment risk?
Next
What are feature flags and how do they integrate with CI/CD?
More CI/CD Pipelines Questions
View all →- Intermediate What is blue-green deployment and how does it achieve zero-downtime releases?
- Intermediate What is a canary release and how does it reduce deployment risk?
- Intermediate What are feature flags and how do they integrate with CI/CD?
- Intermediate What is the testing pyramid in CI/CD and where does each test type run?
- Intermediate What are code quality gates (SonarQube, coverage thresholds) in CI/CD?