<p>I am running kubernetes on Docker-desktop for windows. I am connecting to the cluster from my WSL.
all my pods are running correctly. I am trying to mount a volume on my jupyterlab (pod) using hostpath. below is my config</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: jupyter
  labels:
    app: jupyter
spec:
  replicas: 1
  selector:
    matchLabels:
      app: jupyter
  template:
    metadata:
      labels:
        app: jupyter
    spec:
      containers:
      - name: jupyter
        image: jupyter:1.1
        ports:
        - containerPort: 8888
        securityContext:
          runAsNonRoot: true
          runAsUser: 1000
        volumeMounts:
          - name: mydir
            mountPath: /notebooks
      volumes:
        - name: mydir
          hostPath:
            # directory location on host
            path: /home/&lt;myuser&gt;/data
            # this field is optional
            type: DirectoryOrCreate
</code></pre>
<p>The pod starts without any issues. but i dont see the notbooks which i have kept in my hostpath onto my jupyter labs and vice versa( if i save a notebook in jupyter lab it does not get saved to my hostpath).</p>
<p>i followed the tutorial on <a href="https://kubernetes.io/docs/concepts/storage/volumes/#hostpath" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/storage/volumes/#hostpath</a></p>
<p>i want to point out that i am using the @FROM jupyter/datascience-notebook:python-3.7.6&quot; as my docker image.</p>
<p>i tried mounting /home/jovyan/ but it was giving me access related errors while starting the pod. so i reverted back to &quot;/notebooks&quot;</p>

Seeker
<p>It looks like an issue with how the path is being written on Windows, I see the issue reported in the references below.</p>
<p>Solution:</p>
<ul>
<li>If your file is in say C: drive, it should be converted to the below</li>
</ul>
<pre><code>/host_mnt/c/path/to/my/folder
</code></pre>
<ul>
<li>If the above does not work you may want to remove the &quot;type: DirectoryOrCreate&quot; and retry.</li>
</ul>
<p>References:
<a href="https://github.com/kubernetes/kubernetes/issues/59876#issuecomment-628955935" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/issues/59876#issuecomment-628955935</a>
<a href="https://github.com/docker/for-win/issues/1703#issuecomment-366701358" rel="nofollow noreferrer">https://github.com/docker/for-win/issues/1703#issuecomment-366701358</a> .</p>
