Istio 101 : Traffic routing -Virtual services and Destination rules -

 Istio allows us to set routing rules that dictates how traffic flows to our pods.

For that purpose Istio uses DestinationRules and VirtualServices.

The below destination rules divides our pods into subsets - application-1, application-2 - of the service "

Below is a VirtualService that forwards traffic using the above subsets, it also uses a weighting factor that determines the percentage of traffic that will be forwarded to each subset:

The above VirtualService definition tells Istio that 80% of the traffic destined to the "example_service.svc.cluster.local" service will get forwarded to the pods with the label "app: v1" and the rest will go to the pods that have the "app: v2" label.


Leave as a comment: