-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VSCode remote container development #3960
Comments
Can you clarify on exactly what you are looking for? I don't understand the "manually attach" part at all. There should be no manual steps involved with Skaffold developing against a remote cluster. Is this in reference to debugging? FWIW, https://cloud.google.com/code is a VSCode plug-in that uses Skaffold for Kubernetes development, and supports debugging. |
Skaffold supports debugging but not development in Kubernetes containers. Developers still have to locally install all dev dependencies for their IDE to work, which is something you shouldn’t have to do. Tools like Okteto solve this by allowing people to dev directly into containers: |
@pierreyves-lebrun Skaffold does support syncing files to the remote containers. Does VS Code remote containers support developing multiple containers in parallel? |
Yes I know, but syncing files to a remote container is different than developing in it. This is what VSCode “dev in remote container” feature is about, using a repeatable and easily deployable environment (a container) for development.
Yes and no, if you’ve got 2 containers for let’s say frontend and backend then you’d have to have two VSCode windows open and remote into the frontend and backend container from each window. |
@pierreyves-lebrun - I believe the answer here is likely just running skaffold in a remote interactive container, and connecting VS Code to it. I'm not a pro VS code user, so I'm exactly sure of how to do the latter, but you can probably cobble something together using SSH. |
@tstromberg I am not sure what you mean by “running Skaffold in a remote container”, could elaborate please? I am happy to run Skaffold locally, that isn’t my issue. What I want is to develop in a container holding all my development environment, that way I don’t have to locally install any dependency. That container happens to be deployed by Skaffold, so I could indeed manually attach VSCode to it, but Skaffold should be able to do that automatically. I thought this was a fairly standard practice in 2020 but it seems not to be the case. May I ask how Google developers work? In the case of a node project, do you end up installing all modules on your local machine? |
i think i'm having a bit of trouble understanding how skaffold fits into the picture here. if skaffold is deploying the container that has your development environment in it (that you're presumably connecting to via SSH or remote VSCode), then are you also using skaffold inside of that deployed container as well? it seems to me like you'd want to build the development image (with skaffold inside of it) once, deploy it, then attach and run skaffold "locally" (inside of the container) while you iterate on your app. maybe i'm misunderstanding the use case though? i can only speak for our team, but for our development we configure our environments locally to our machines. maybe we're living in the past, but it's what we do right now 🤷 |
Similar case here, I prefer to develop inside the container so I can assure my development env does not pollute and be sharable with others. |
JIs there a straightforward way to develop in a remote container from VSCode?
Afaik, the only way to achieve this is to manually attach to one of the running containers Skaffold deployed on the K8s cluster.
This can be tedious in the case of a remote cluster composed of many nodes. Every time Skaffold rebuilds a container, devs need to find which K8s node has been used and reattach to it.
A local or remote Minikube setup probably doesn’t have that issue but I’d like to know if a better VSCode remote container development integration is possible.
https://code.visualstudio.com/docs/remote/containers
The text was updated successfully, but these errors were encountered: