Istio multi-cluster communication not working when services use different port/targetPort

Hi community,

I have a scenario where multi-cluster service communication does not work based on service port configuration. As soon the port and targetPort of the service are not having the same value, the service does not call services in other clusters.

To make it easier to understand, here are two scenarios.

Scenario 1: port and targetPort are same (8080/8080)

In this case the client service is calling the service in both clusters

Scenario 2: port and targetPort are different (9090/8080)

In this case service calls only reach the service in the same cluster as the caller.

The proxy config shows that the server service is clearly registered for cross cluster communication, even the ports are different. But for some reason that I can’t figure out yet, no call is going towards the service in the other cluster.

We can see here that the service port is 8080, while the targetPort is 9090. We also see that the service is registered to be routed over the eastwest gateway configured for cross cluster communiation:

10.102.20.48:15443   HEALTHY     OK outbound|8080||server.testserver.svc.cluster.local
10.102.26.94:15443   HEALTHY     OK outbound|8080||server.testserver.svc.cluster.local
10.102.37.164:15443 HEALTHY     OK outbound|8080||server.testserver.svc.cluster.local
100.96.21.120:9090   HEALTHY     OK outbound|8080||server.testserver.svc.cluster.local