<p>I have two k8s clusters running in Azure. I want to reach an IP from Cluster A which is exposed in Cluster B. The IP(10.148.157.253) is exposed in Cluster B via load balancer.
In Cluster A I have created and endpoint and a service. When I curl from one of my pods <a href="http://10.148.157.253:8080" rel="nofollow noreferrer">http://10.148.157.253:8080</a> I get the result. However when I curl the service <a href="http://my-service.app.svc.cluster.local" rel="nofollow noreferrer">http://my-service.app.svc.cluster.local</a> I get connection refused. Here are the configs from Cluster A:</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: my-service
  namespace: app
spec:
  ports:
    - name: http
      port: 80
      targetPort: 8080
---
apiVersion: v1
kind: Endpoints
metadata:
  name: my-service
  namespace: app
subsets:
 - addresses:
     - ip: 10.148.157.253
   ports:
     - port: 8080
       protocol: TCP
</code></pre>
<p>This is how the load balancer in cluster B looks like:</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: my-loadbalancer
  namespace: app
  annotations:
    service.beta.kubernetes.io/azure-load-balancer-internal: &quot;true&quot;
    service.beta.kubernetes.io/azure-load-balancer-internal-subnet: &quot;my-subnet&quot;
spec:
  type: LoadBalancer
  loadBalancerIP: 10.148.157.253
  ports:
  - protocol: TCP
    port: 8080
  selector:
    app: my-app
</code></pre>
<p>Do you know what might cause the issue that I can curl the load balancer IP, but not the service itself?</p>

Teodor Dimitrov
<p>What really solved the problem is another service of type ExternalName which used the ip of the load balancer as an externalName.</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: my-service
  namespace: app
spec:
  type: ExternalName
  externalName: 10.148.157.253
</code></pre>
