liveBook · Manning

Blue-green deployment

As explained in Kubernetes for Developers

A blue/green strategy is a rollout technique that runs old and new application versions side by side and switches traffic between them.

Blue-green deployment runs the existing and new application versions side by side. After the new version is fully deployed and tested, traffic switches to it; if problems appear, traffic can switch back immediately. section 4.2.3

A blue-green rollout trades temporary resource cost for fast, controlled releases:

  • Keeps only one version live for users after cutover, preserving a consistent experience. section 4.2.3
  • Completes cutovers and rollbacks within seconds when both environments remain ready. section 4.2.3
  • Temporarily doubles compute usage because both versions stay scaled up during validation. section 4.2.3
  • May route internal users or a percentage of external traffic to the new version before full cutover through canary analysis. section 4.2.3
  • Requires additional tooling or manual process because Kubernetes Deployments do not directly support blue-green rollouts. section 4.2.3

A controlled production switch

Deploy the new version alongside the old one, test it, and direct the Service to the new Deployment. Keep the old version available while the new version is evaluated, then remove it after validation or switch traffic back if a problem appears. section 4.2.3

How Kubernetes for Developers covers it

How deep it goes
Explains deployment, testing, traffic switching, validation, rollback, costs, and tooling, but not detailed configuration steps.
Examples
Uses two Deployments behind one Service, internal-user testing, percentage-based traffic, and delayed removal of the old version.
What it assumes
Assumes readiness checks and compatibility between current and previous application versions when both versions serve traffic.
What you can do after
Operate a blue-green rollout using Kubernetes constructs and choose additional traffic-splitting or pipeline tooling when needed.
How it connects
Contrasts with rolling updates and recreate, and connects with canary analysis, readiness probes, Kubernetes Services, and Kubernetes Deployments.

Also explained in

Compare how 5 books explain blue-green deployment →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kubernetes for Developers. The section links point to the parts of the book it draws on.