Switching traffic from blue to green

Let's perform the following steps to switch traffic from blue to the new green deployment:

Edit the service using the following command and replace blue with green. Service traffic will be forwarded to the pod that is labeled green:

$ kubectl edit svc percona

In this recipe, you have learned how to upgrade your application with a stateful workload using the blue/green deployment strategy.