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. First, let's remind ourselves how blue-green deployments work. Here is a rough step-by-step instruction:

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

Get Learn Docker - Fundamentals of Docker 19.x - Second Edition 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.