Multi-network/Multi-cluster - Not able to establish connection because east-west gateway has a hostname(EKS cluster)

followed the guide Istio / Install Multi-Primary on different networks , and the installation was smooth without any errors. For ca certs , I’ve created the secret using the example certificate material from samples/certs/*.pem for both cluster1 and cluster2.

The setup is working fine with AKS and GKE clusters. Ive verified it using the guide Verify the installation. that is, its been able to route to both versions of helloworld.

When i setup cluster1 (GKE) and cluster2( EKS ) the same way, I’m getting the below error in the istiod logs of both clusters:
**Failed parsing gateway address a780ca83fhjvhgb7r71710855cca6a3-506210761.eu-west-1.elb.amazonaws.com from Service Registry. Hostnames are not supported for gateways**

Both these clusters are Private. and their NAT IPs have been added to each other under ‘master authorized network’, so that the API server is accessible to both.

a780ca83fhjvhgb7r71710855cca6a3-506210761.eu-west-1.elb.amazonaws.com is the east-west gateway elb of cluster2(eks).

`host a780ca83fhjvhgb7r71710855cca6a3-506210761.eu-west-1.elb.amazonaws.com
a780ca83fhjvhgb7r71710855cca6a3-506210761.eu-west-1.elb.amazonaws.com has address 52.76.47.247
a780ca83fhjvhgb7r71710855cca6a3-506210761.eu-west-1.elb.amazonaws.com has address 52.98.13.243`

Going through github.com/istio/istio/issues/29359](http://github.com/istio/istio/issues/29359 , i get that hostname-based gateway is not supported for east-west traffic. As a workaround, i tried adding temporal elbs ips in ConfigMap istio under ‘meshNetwork’ as mentioned here.

`meshNetworks: |-
    networks:
      network2:
        endpoints:
          - fromRegistry: ekscluster
        gateways:
          - address: 52.76.47.247
            port: 15443
          - address: 52.98.13.243
            port: 15443
      network1:
        endpoints:
          - fromRegistry: gkecluster
        gateways:
          - address: 35.313.396.77
            port: 15443`

The above configuration is reflecting in the istiod logs in both clusters:

`"networks": {
        "network1": {
            "endpoints": [
                {
                    "fromRegistry": "gkecluster"
                }
            ],
            "gateways": [
                {
                    "address": "35.313.396.77",
                    "port": 15443
                }
            ]
        },
        "network2": {
            "endpoints": [
                {
                    "fromRegistry": "ekscluster"
                }
            ],
            "gateways": [
                {
                    "address": "52.76.47.247",
                    "port": 15443
                },
                {
                    "address": "52.98.13.243",
                    "port": 15443
                }
            ]
        }
    }
}
`

But I’m still facing the same issue and this is shown in istiod logs in both clusters:
**Failed parsing gateway address a780ca83fhjvhgb7r71710855cca6a3-506210761.eu-west-1.elb.amazonaws.com from Service Registry. Hostnames are not supported for gateways**

when I attempt to verify the installation using the guide Verify the installation the requests are not getting routed to the remote cluster as expected. I am only getting responses from the service on the local cluster.

Version

`$ istioctl version
client version: 1.11.4
control plane version: 1.11.4
data plane version: 1.11.4 (10 proxies)

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.1", GitCommit:"632ed313f2c34f6d6d15ca4cef3d3c7073412212", GitTreeState:"clean", BuildDate:"2021-08-19T15:45:37Z", GoVersion:"go1.16.7", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"19+", GitVersion:"v1.19.15-gke.1801", GitCommit:"12532d9bc11711832634f870e6083a51837b34a3e8", GitTreeState:"clean", BuildDate:"2021-10-21T21:27:39Z", GoVersion:"go1.15.15b5", Compiler:"gc", Platform:"linux/amd64"}
`