I have a problem with the communication between pod to pod in canary deployment with istio. Am able to handle external traffic coming to istio using source Label in virtual service and destination Rule, but how to handle internal pod to pod traffic should go for same version pod.
Pod to Pod traffic should be go for same version of pod
If the setup is done correctly, you should have two different deployments, since the canary deployment in Kubernetes would be done using two Deployments.
One have label
version: v1
and another has labelversion: v2
, which you probably used in your spec.subsets field inside the DestinationRule. Alos in yourvirtual service
its configuration includes a destination routing rule that sends X% of the traffic to version v1 (production build) and Y% of the traffic to version v2 (canary build). This is seen in thespec:http:route:weight
specification.Pod-to-pod communication will automatically follow the rules defined in the Istio DestinationRules.