Skip to content

Blue-Green Deployment strategy

The Blue-green deployment strategy is a release management technique that reduces downtime and risk by running two identical production environments (traditionally named "Blue" and "Green").^[400-devops__06-Kubernetes__k8s-paas__08.spinaker部署与应用.md]

At any given time, only one of the environments is live and serving production traffic^[400-devops__06-Kubernetes__k8s-paas__08.spinaker部署与应用.md]. For example, if the "Blue" environment is currently active, the "Green" environment remains idle or hosts the previous version^[400-devops__06-Kubernetes__k8s-paas__08.spinaker部署与应用.md].

Deployment Process

When a new version of an application needs to be released, it is deployed to the idle environment^[400-devops__06-Kubernetes__k8s-paas__08.spinaker部署与应用.md]. Once the new version is deployed and undergoes testing in the isolated environment, the traffic router (such as a load balancer or Ingress Controller) is switched to direct traffic to the newly updated environment^[400-devops__06-Kubernetes__k8s-paas__08.spinaker部署与应用.md].

This mechanism allows for an immediate switch to the new version with near-zero downtime^[400-devops__06-Kubernetes__k8s-paas__08.spinaker部署与应用.md]. If any issues are detected after the switch, traffic can be reverted to the previous environment (the "rollback") just as quickly^[400-devops__06-Kubernetes__k8s-paas__08.spinaker部署与应用.md].

Advantages

  • Zero Downtime: Switching traffic between two ready environments allows for continuous availability during updates^[400-devops__06-Kubernetes__k8s-paas__08.spinaker部署与应用.md].
  • Instant Rollback: Since the previous version remains running in the background, reverting to it is nearly instantaneous compared to redeploying a backup^[400-devops__06-Kubernetes__k8s-paas__08.spinaker部署与应用.md].
  • [[Rolling Update]]
  • [[Continuous Delivery]]

Sources

^[400-devops__06-Kubernetes__k8s-paas__08.spinaker部署与应用.md]