how to edit file on remote host container where kubernetes pod is created

Viewed 473

In my scenario, our package from gitlab is already implemented pipeline to deploy kubernetes pod on remote host server. If I want to edit/open folder on kubernetes pod of the container using vscode, is it doable for vscode?

1 Answers

Official Visual Studio Code documentation shows how to attach to a running container, also inside Kubernetes cluster.


However, using Persisent Volumes may be a better approach.

Files modified in a "local" directory are simultaneously modified in attached volume (this is a bit more complicated but lets go with that for the sake of example), and they persist between pod restarts.

Related