Blue–green deployment

If we want to do a blue–green style deployment for our component web of the pets application, then we can do so by using labels creatively. Let's first remind ourselves how blue–green deployments work. Here is a rough step-by-step instruction:

  1. Deploy a first version of the component web as blue. We will label the pods with a label color: blue to do so.
  2. Deploy the Kubernetes service for these pods with the label, color: blue in the selector section.
  3. Now we can deploy version 2 of the web component, but this time the pods have a label, color: green.
  4. We can test the green version of the service that it works as expected.
  5. Now we flip traffic from blue to green by updating the Kubernetes service for the web component. We ...

Get Learn Docker - Fundamentals of Docker 18.x now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.