Service discovery on Multi-Primary on different networks

Could be very simple for someone to answer this.

How do you access services discovered in multi primary cluster environment

I have service webappsvc running on Cluster1 and unless I create webappsvc on cluster2 I’m not able to access the webappsvc.Cluster1 service from Cluster2. I can see the endpoint is discovered in Cluster2 for the service webappsvc.Cluster1 but can’t really access it without creating identical service in Cluster2.

My query is if the service is discovered then it should be accessible directly through discovered ep? or I need to create ServiceEntry in Cluster2 ?

Thanks in advance

This is actually kubernetes DNS limitation which is single cluster aware. There are few options that you have here.

  • Create an identical service with the same namespace name.
  • Create a serviceentry
  • Use Istio DNS proxy.

More details are here.

Thanks @abasitt

I managed it with dummy service with garbage endpoint to the service. How often Istio checks for the liveness of the endpoint? I mean I’m interested in what is overhead of having this dummy service on the cluster.

Tx

If you mean kubernetes liveness feature, Istio doesn’t. Istio just provide a way to expose the liveness to kube-proxy.
Istio provide OutlierDetection and that is configurable.