A blue green deployment strategy runs two identical production environments: blue serves live traffic while green runs the new release. Once green passes its tests, traffic is switched to it in one step, and blue stays ready so the team can switch back in seconds if something goes wrong.
In Kubernetes, blue green is not a built-in Deployment option. The native Deployment object supports only rolling updates and recreate, so platform teams implement blue green by switching a Service selector, by using controllers such as Argo Rollouts or Flagger, or by moving route weights with Gateway API. This guide compares those options, explains what changed recently, and sets out when blue green is worth its extra cost.
The blue environment runs the current version and handles all user traffic. The green environment runs the new version with the same configuration, capacity and dependencies, and is tested away from users. When green is ready, the router or Service in front of both is changed so that all requests go to green. Blue is kept running for a period so that rollback is a routing change rather than a redeployment.
The appeal for enterprise teams is predictable releases: users see either the old or the new version, never a mix, and rollback is fast. The price is running two full environments during each release. For the wider set of Kubernetes release tooling, see our guide to Kubernetes deployment tools and best practices.
The core Kubernetes building blocks are Deployments, which run versioned sets of pods, and Services, which route traffic to pods that match a label selector. A basic blue green release follows three stages: deploy the new version as a separate Deployment, test it, then change the Service selector so live traffic reaches it.
The Kubernetes Deployment documentation lists only two strategy types, Recreate and RollingUpdate, with RollingUpdate as the default and both maxSurge and maxUnavailable defaulting to 25%. A rolling update mixes old and new pods during the rollout, which is why teams that need an all-at-once switch add a controller or routing layer on top.
| Option | How the switch happens | When it fits | Current status (November 2026) |
|---|---|---|---|
| Service selector switch | Two Deployments with version labels; the Service selector is changed from blue to green | Small teams, few services, manual or scripted releases | Core Kubernetes; no extra components |
| Argo Rollouts BlueGreen | A Rollout resource points an active Service and an optional preview Service at ReplicaSets and switches the active Service on promotion | Teams using Argo CD or wanting analysis gates and manual promotion | Documented BlueGreen strategy; traffic router plugins, including a Gateway API plugin, are an alpha feature since 1.5.0 |
| Flagger Blue/Green | Flagger runs tests and metric checks for a set number of iterations, then switches live traffic on promotion | Flux users and teams that want automated promotion and rollback | Supported with the Kubernetes CNI, Istio, Linkerd, App Mesh, NGINX, Contour, Gloo Edge and Gateway API |
| Gateway API HTTPRoute weights | backendRefs weights move traffic from blue to green, all at once or in steps | Teams standardising on Gateway API for ingress | HTTPRoute has been GA (v1) since Gateway API v1.0 |
| Ingress-based switch | The Ingress backend is changed from the blue to the green Service | Existing estates still on Ingress | Ingress NGINX is retired; use another supported controller or migrate to Gateway API |
Argo Rollouts is "a Kubernetes controller and set of CRDs which provide advanced deployment capabilities", including blue green and canary. In its BlueGreen strategy, the activeService carries production traffic and the previewService lets teams test the new ReplicaSet first. Key settings from the documentation:
Flagger is a progressive delivery Kubernetes operator in the Flux family. For blue green, it replaces traffic weights with a number of iterations: it runs conformance and load tests, checks metrics every interval, and switches live traffic when the release is promoted. According to its documentation, "For Blue/Green deployments no service mesh or ingress controller is required." Blue/Green with traffic mirroring is available with Istio and Gateway API, and should be used only for idempotent requests because each request is sent to both versions.
With Gateway API traffic splitting, an HTTPRoute lists blue and green Services as backendRefs with weights. Weights are proportional, so 90 and 10 send about 90% and 10% of traffic, and setting blue to 0 completes the cut-over. A header-matched rule can send test traffic to green before any users reach it, and if green shows errors "the weights can be updated to quickly shift traffic back".
| Strategy | How traffic moves | Best for | Trade-off |
|---|---|---|---|
| Rolling update | Pods are replaced gradually; old and new run together | Stateless services with backward-compatible changes | Mixed versions during rollout; rollback is another rollout |
| Blue green | All traffic switches at once after testing | Releases where users must see one version and rollback must be instant | Double capacity during the release |
| Canary | A small share of real traffic first, then larger steps | High-traffic services where metrics can judge a release | Needs a traffic manager and good metrics; slower to complete |
| A/B testing | Users routed by header or cookie | Product experiments comparing versions | Not a safety mechanism on its own |
Many teams combine methods: blue green for the switch, with a short canary or mirrored phase before it. Our guide to A/B testing covers the experimentation side.
Monitoring decides whether a switch was safe. Use the same service-level indicators for pre-promotion and post-promotion analysis, and alert on error rates and latency rather than pod status alone. AgentSRE uses a fleet of AI agents to automate detection, root cause analysis and remediation for teams that cannot afford downtime.
Blue green is a poor fit when capacity is tight and doubling a large service is too expensive, when schema changes cannot be made backward compatible, or when a release needs real-user metrics to judge it, which canary handles better. For small internal services, a rolling update with readiness probes is often enough.
To map one release decision your agents should make, such as when to promote or roll back, and the context and policy it depends on, book a Context Workshop. See what happens in the workshop.
It is a release method that runs two production-ready environments. Blue serves live users, green runs the new version, and traffic is switched to green once it passes tests. Blue stays available so you can switch back quickly if problems appear.
Not as a Deployment strategy. A Kubernetes Deployment supports only RollingUpdate, the default, and Recreate. Blue green is built by switching a Service selector or by using a controller such as Argo Rollouts or Flagger, or weighted routes in Gateway API.
Blue green moves all traffic to the new version in one switch after testing, with the old version kept ready for rollback. Canary shifts a small share of real traffic first and increases it in steps while metrics are checked.
Argo Rollouts suits teams that want a Rollout resource with active and preview Services and analysis gates. Flagger suits Flux users and works with the Kubernetes CNI, service meshes and Gateway API. Gateway API weights suit teams that manage routing directly.
The Kubernetes project retired Ingress NGINX: best-effort maintenance ran until March 2026, and there are no further releases or security fixes after that. Plan a move to Gateway API or another supported controller.
By default the old ReplicaSet is scaled down 30 seconds after the switch, set by scaleDownDelaySeconds. Increase it if you need a longer window for instant rollback.