4.2.3 Blue/green strategy

View in the book. Buy the book.

Rolling out with blue/green.

4.4 A Pod status during a blue/green rollout. Unlike the previous strategies, there are two action points where other systems, potentially including human actors, make decisions.
Figure 4.4 A Pod status during a blue/green rollout. Unlike the previous strategies, there are two action points where other systems, potentially including human actors, make decisions.
4.5 A single Service alternates between two Deployments, each with a different version of the container.
Figure 4.5 A single Service alternates between two Deployments, each with a different version of the container.

To test, first setup:

$ cd Chapter04/4.2.3_BlueGreen/
$ ls
deploy-blue.yaml  deploy-green.yaml  service.yaml
$ kubectl create -f .
deployment.apps/timeserver-blue created
deployment.apps/timeserver-green created
service/timeserver created
$ nano service.yaml 

Change blue to green

Nano

Apply the change

$ kubectl apply -f service.yaml 
service/timeserver configured

The cutover should be immediate.