From the course: Kubernetes for Java Developers

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Traffic shifting using Istio

Traffic shifting using Istio

From the course: Kubernetes for Java Developers

Start my 1-month free trial

Traffic shifting using Istio

- [Narrator] We saw Java applications deployed as pods in our Kubernetes application. When we were invoking that application the traffic was about 50% split between each of those applications. But one of the power of Istio is that the rules configuration and traffic routing let's you control the flow of traffic and the API calls between services. It can exactly define how much traffic should go to one service. This is particularly relevant if you're doing Canary testing or A/B testing. Let's see how we can accomplish something like that. So we are in this directory here. Go to manifests. Standalone. Open up greeting. Istio.yaml. And we go very much to the bottom here. On line 46 we have 50 weight assigned to greeting hello and on line 52 we have 50 weight assigned to greeting howdy. Let's change that weight. Where we make this 90 and make this 10. So now, when we invoke the service, 90% of the traffic, about 90% of the traffic, should go to greeting hello, and about 10% of the traffic…

Contents