How to mount external directory in kubernetes service like docker -v /host/directory:/container/directory
? Or how access from remote pc to volume in kubernetes service ?
P.S.: My case : I am developing an interpreted program such as a node.js program. I want to use the editor/IDE on my desktop. But I want to run the program in a pod because it relies on things that exist in the kubernetes environment, and not my desktop (e.g. DNS, service account credentials, services, more memory/cpu, etc). I want to avoid the step of rebuilding an image and restarting a pod every time I make an edit.
Some answer here https://github.com/kubernetes/kubernetes/issues/18007
you need to use the hostpath to mount the dir. from your host system. here is the sample from the doc.
https://kubernetes.io/docs/concepts/storage/volumes/#example-pod-1