<p>I'm using Docker Desktop on Windows 10. For the purposes of development, I want to expose a local folder to a container. When running the container in Docker, I do this by specifying the volume flag (-v). </p>

<p>How do I achieve the same when running the container in Kubernetes?</p>

Røye
<p>You should use <a href="https://kubernetes.io/docs/concepts/storage/volumes/#hostpath" rel="noreferrer">hostpath</a> Volume type in your pod`s spec to mount a file or directory from the host node’s filesystem, where hostPath.path field should be of following format to accept Windows like paths:</p>
<ul>
<li>/W/fooapp/influxdb</li>
<li>//W/fooapp/influxdb</li>
<li>/////W/fooapp/influxdb</li>
</ul>
<p>Please check <a href="https://github.com/kubernetes/kubernetes/issues/59876" rel="noreferrer">this</a> github issue explaining peculiarities of Kubernetes Volumes on Windows.
I assume also that you have enabled <a href="https://web.archive.org/web/20181231025453/http://peterjohnlightfoot.com/docker-for-windows-on-hyper-v-fix-the-host-volume-sharing-issue/" rel="noreferrer">Shared Drives</a> feature in your Docker for Windows installation.</p>
