microsoft / mindaro

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

Support for any Kubernetes cluster in Visual Studio and VS Code (Preview) #97

Open greenie-msft opened 3 years ago

greenie-msft commented 3 years ago

Hi everyone,

After the recent release of our new Visual Studio extension, I'm excited to announce that Bridge to Kubernetes supports any Kubernetes cluster in Visual Studio and VS Code. Whether you’re connecting to your development cluster running in the cloud, or to your local cluster, Bridge to Kubernetes is available for your end-to-end debugging scenarios.

We're interested in any and all feedback regarding this new experience. If you have any questions please feel free to respond to this thread, or reach out over email: BridgeToKubernetes@microsoft.com

Happy debugging!

Best, Nick

xclw2000 commented 3 years ago

Can u give a step by step tour for a new project or an exists project?

daniv-msft commented 3 years ago

If you are using VS Code, please have a look at this tutorial: https://code.visualstudio.com/docs/containers/minikube This tutorial is initially for Minikube, but it can apply to any third-party Kubernetes cluster (if you're not using Minikube, please skip to Deploy the application).

If you're using Visual Studio, unfortunately we don't have a tutorial as of today but we're working on it. We'll keep you updated once we release it.

Ble3dingEdg3 commented 3 years ago

Does this mean that B2K8s works with clusters in any cloud?

daniv-msft commented 3 years ago

@Ble3dingEdg3 Yes, you can use Bridge with any cloud provider or local cluster (AKS, AWS, GKE, minikube, etc.). If you encounter an issues with a specific cloud, please don't hesitate to report an issue.

maucaro commented 3 years ago

I am trying to use this with a local cluster (Docker Desktop with K8s enabled) but the issue is that there seems to be a conflict between with port use between Docker Desktop and BtK8s. See error message: btk8s_error Port 80 on localhost is used by Docker Desktop to expose the TO-DO app UI. Any suggestions?

amsoedal commented 3 years ago

Hi @maucaro, thanks for reporting this issue. I'm going to follow up on our side about this, but in the meantime could you look into using Kubernetes service environment variables instead as a workaround? Link is here: https://code.visualstudio.com/docs/containers/kubernetes-env-vars

Update: One caveat is that the workaround I mentioned above will only work for VSCode right now. We're working to support this on VS however.

maucaro commented 3 years ago

Thanks @amsoedal ; what I ended up doing was using minikube (and minikube tunnel) instead of Docker Desktop's K8s. It would be nice to be able to use Docker Desktop's K8s (one less thing to install) but the workaround is not too painful.