The  Blue-Green deployment  is a release strategy used for deploying software in a pro‐ duction environment by minimizing downtime and reducing risk. Kubernetes’ Deployment abstraction is a fundamental concept that lets you define how Kuber‐ netes transitions immutable containers from one version to another. We can use the Deployment primitive as a building block, together with other Kubernetes primitives, to implement this more advanced release strategy of a Blue-Green deployment. A Blue-Green deployment needs to be done manually if no extensions like a Service Mesh or Knative is used, though. Technically it works by creating a second Deploy‐ ment with the latest version of the containers (let’s call it  green ) not serving any requests yet. At this stage, the old Pod replicas (called  blue ) from the original Deploy‐ ment are still running and serving live requests. Once we are confident that the new version of the Pods is healthy and ready to handle live requests, we switch the traffic from old Pod replicas to the new replicas. This activity in Kubernetes can be done by updating the Service selector to match the new containers (tagged as green). As demonstrated in Figure 3-3, once the green contain‐ ers handle all the traffic, the blue containers can be deleted and the resources freed for future Blue-Green deployments. A benefit of the Blue-Green approach is that there’s only one version of the applica‐ tion serving requests, which reduces the complexity of handling multiple concurrent versions by the Service consumers. The downside is that it requires twice the applica‐ tion capacity while both blue and green containers are up and running. Also, there can be significant complications with long-running processes and database state drifts during the transitions. Canary release  is a way to softly deploy a new version of an application into produc‐ tion by replacing only a small subset of old instances with new ones. This technique reduces the risk of introducing a new version into production by letting only some of Canary Release 30  |  Chapter 3: Declarative Deployment Figure 3-3. Blue-Green release Blue-Green Release