I have 2 minikube clusters: Cluster1 and Cluster2.
Cluster1 has Backend Service
Cluster2 has Info Service
Usecase: Backend service sends request to the Info service using the ingress gateway
Cluster2 has a ingress gateway and I used minikube tunnel command to get an external IP for the gateway. The IP was 127.0.0.1 and port is 8080. If I curl from the Backend pod to host.docker.internal on port 8080, I get the correct response from the Info service.
I have created a service entry for the external service(Info) in Cluster1.
apiVersion: networking.istio.io/v1alpha3 kind: ServiceEntry metadata: name: info-ext spec: hosts: - host.docker.internal ports: - number: 8080 name: http protocol: HTTP resolution: DNS location: MESH_EXTERNAL
When I try to access http://host.docker.internal from the backend application. It keeps sending the request on port 80.
* Rebuilt URL to: http://host.docker.internal/ * Trying 192.168.65.2... * TCP_NODELAY set * Connected to host.docker.internal (192.168.65.2) port 80 (#0) > GET / HTTP/1.1 > Host: host.docker.internal > User-Agent: curl/7.52.1 > Accept: */*
Can I get any leads about what I am missing and how can I access a external service directly.