Interview Prep/CI/CD/Deployment Strategies and GitOps

What is blue-green deployment?

BeginnerConceptDeployment Strategies and GitOps
Answer

You keep two identical environments: blue (live) and green (idle). Deploy and test the new version on green, then switch traffic by changing the load balancer, DNS or a Kubernetes Service selector. Rollback is switching back. Benefits: instant cutover and rollback with full pre-production verification. Costs: double the infrastructure during the release, and database schema changes must work with both versions.

kubectl patch service shop -p '{"spec":{"selector":{"app":"shop","version":"green"}}}'
All CI/CD questions Roadmap: CI/CD fundamentals

More on Deployment Strategies and GitOps