Kubernetes

Explain Blue/Green deployments/rollouts in detail

Difficulty: unrated

Source: bregman-arie/devops-exercises by Arie Bregman

Answer

Blue/Green deployment steps:

  1. Traffic coming from users through a load balancer to the application which is currently version 1

Users -> Load Balancer -> App Version 1

  1. A new application version 2 is deployed (while version 1 still running)

Users -> Load Balancer -> App Version 1 App Version 2

  1. If version 2 runs properly, traffic switched to it instead of version 1

User -> Load Balancer App version 1 -> App Version 2

  1. Whether old version is removed or keep running but without users being redirected to it, is based on team or company decision

Pros:

  • We can rollback/switch quickly to previous version at any point Cons:
  • In case of an issue with new version, ALL users are affected (instead of small portion/percentage)