microsoft / mindaro

Bridge to Kubernetes - for Visual Studio and Visual Studio Code
MIT License
307 stars 106 forks source link

[Question] How to call dependent services from local? #227

Open Vijay-Nirmal opened 3 years ago

Vijay-Nirmal commented 3 years ago

General Is it possible to call dependent services that are from another namespace? If not, is there any workaround

In Non Isolation mode Is it possible to call dependent services even in same namespace? I tried it,It was not working. It shows host not found exception Url I used: http://dependent-service.same-namespace.svc.cluster.local/

amsoedal commented 3 years ago

Hi @Vijay-Nirmal, you can make a service from another namespace available locally using the KubernetesLocalProcessConfig.yaml file. Please see the documentation here: https://docs.microsoft.com/en-us/visualstudio/bridge/configure-bridge-to-kubernetes#make-a-service-available

Let me know if this works for you!

Vijay-Nirmal commented 3 years ago

@amsoedal It worked, Thanks a lot.

I am facing 1 more issue. My isolation url is not created automatically. I tried http://isolationid.service.namespace.svc.cluster.local/ but it shows "This site can’t be reached". If you want, I can create a separate issue for this. image

amsoedal commented 3 years ago

@Vijay-Nirmal How is your service exposed apart from Bridge? Does it have an external IP or do you have ingresses set up?

Vijay-Nirmal commented 3 years ago

@amsoedal It doesn't have external IP. It is exposed via Istio Gateway and (another way) Virtual Service (istio). I know it doesn't work with Istio proxy so I have disabled it.

amsoedal commented 2 years ago

@Vijay-Nirmal I'm not familiar with Istio Gateway and Virtual Service, but I did some reading on it just now. Bridge is unfortunately only able to populate the URL from Services of type LoadBalancer, Ingresses, or IngressRoutes (Traefik), and since Gateway and VirtualService are custom Istio resources it doesn't know to look for these. I can add an item for supporting this scenario to the backlog. In the meantime, what happens if you go to http://isolationid.<external host name> instead of the in-cluster version?

Vijay-Nirmal commented 2 years ago

what happens if you go to http://isolationid. instead of the in-cluster version?

@amsoedal It will show sight can't be reached