Blue Green deployment - sending traffic between microservices of same version?

Hello everyone.

I have gone through the documentation, some forum posts and some internet articles on istio for blue green deployment. Everything talks about a single scenario which is to send the traffic to the POD from the Istio Gateway

For example, if I have an application consists of microservices, such as UI and API the traffic would look like this

Istio Gateway → Virtual Service → UI Service → API Service

When I have a new version of the UI and API service, in order to have blue green deployment I would deploy a new version pod of the service and use the routing rules such as

Istio Gateway → Virtual Service → Destination Rules → UI Service v1 →
Istio Gateway → Virtual Service → Destination Rules → UI Service v2 →

The question is how to make sure that the UI Service v2 is connecting to the API Service v2?

As per my understanding , DestinationRule applies to only Ingress (Virtual Service). So if UI Service v2 wants to connect to the API Service, how to tell the v2 of the UI service to connect to v2 of the API service?

VirtualServices and DestinationRules do not just apply to Ingress but can apply to sidecars as well. So you can apply routing for traffic leaving your application for another.