I am running Docker (edge version 1.37) with Kubernetes on my local machine to do some development work. If I am just running docker from the command line on my machine i can spin up a container and mount a volume like so:
docker run -v D:\myhost\mydirectory:/myvolume ...
However, when creating a deployment to Kubernetes, is it possible to mount the same volume to a container running inside a pod? For example, the following deployment fails to mount because i assume kubernetes is itself running inside a container and does not recognize my system path D:\myhost\path
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: myDeployment
spec:
...
containers:
...
volumeMounts:
- name: mymount
mountPath: /etc/mymount
ports:
...
volumes:
- name: mymount
hostPath:
path: D:\myhost\path
type: Directory
Is there some magic I can do to achieve this?
Thanks!