microsoft / mindaro

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

Redirect deployments / pods instead of services to the machine #246

Open bruno-brant opened 2 years ago

bruno-brant commented 2 years ago

Is your feature request related to a problem? Please describe. Yes. Today we can only redirect services to our machines. However, many deployments don't require services - some of them are workers that operates by connecting to event brokers such as Kafka.

As it is, I have to create a service for those deployments just so I can start Bridge. Traffic for the port isn't at all interesting to me - since no network traffic is ever pushed to the microservice.

Describe the solution you'd like We should be able to configure Bridge to point to a deployment that would be replaced by our local process.

amsoedal commented 2 years ago

Hi @bruno-brant, thanks for this feature request. This seems like something we need to tackle. In the meantime, I wanted to let you know that you can debug individual pods (but not in isolated mode) via the Kubernetes extension in VS Code -- you can navigate to a pod in the K8s sidebar, right click it, and select "Debug (local tunnel)". Perhaps that might get around the issue of needing to create a service?

There's an example of debugging a service this way -- should be the same for pods, except you have to go through the sidebar and not the command palette if I recall. https://docs.microsoft.com/en-us/visualstudio/bridge/bridge-to-kubernetes-vs-code#install-and-use-local-tunnel-debugging