Using Traffic Shifting on Istio to make Blue/Green Deployments on Kubernetes

In this post i’ll show how to do blue/green deployements on Kubernetes using Istio.

After installation we should create our namespace and set istio sidecar injection. Im using namespace label with automated injection using

Our test yaml:

Applying this yaml using

Now we need to create istio gateway for our service and define route rules

These create gateway and virtualservice for our app.
After that we can use istio-ingressgateway to test our system.
We select v1 for all traffic we should always see blue webischia.

Monitoring of these services(thanks istio for taking care of all ­čÖé )

And lets say we created new versino and want to publish but split traffic by %80 to %20.

As you can see our graphics shows traffic shifting is applied.

This happen without any server or client side errors.

Now lets our weights 80 green 20 blue.

And finally we can fully shift to green.

Istio shows us we can do traffic shifting so much easy. Observabilty is also a big deal and super easy with istio.

This entry was posted in Kubernetes and tagged , , , , , , . Bookmark the permalink.

Leave a Reply