<p>I am trying to setup a Local Persistent volume using local storage using WSL. But the pod STATUS stops at <strong>Pending</strong>.</p>
<p>The <code>kubectl describe pod &lt;pod-name&gt;</code> gives below error.</p>
<p><code>Warning  FailedMount       21s (x7 over 53s)    kubelet            MountVolume.NewMounter initialization failed for volume &quot;pv1&quot; : path &quot;/mnt/data&quot; does not exist</code></p>
<p>The path <code>/mnt/data</code> has been created and exists on the local machine but cannot be accessed by the container.</p>
<p>and the pod and Persistent volume configuration as below.</p>
<pre><code>apiVersion : v1
kind : PersistentVolume
metadata :
   name : pv1
spec :
  capacity :
    storage : 2Gi
  accessModes :
    - ReadWriteOnce
  persistentVolumeReclaimPolicy : Retain
  storageClassName : local-storage
  local : 
    fsType : ext4
    path : /mnt/data
  nodeAffinity:
    required:
      nodeSelectorTerms:
      - matchExpressions:
        - key: kubernetes.io/hostname
          operator: In
          values:
          - node1

---

apiVersion : v1
kind : PersistentVolumeClaim
metadata : 
  name : pvc1
spec :
  resources :
    requests :
      storage : 1Gi
  accessModes :
    - ReadWriteOnce
  storageClassName : local-storage

---

apiVersion : v1
kind : Pod
metadata :
  name : pod1
spec :
  containers:
  - name: www
    image: nginx:alpine
    ports:
      - containerPort: 80
        name: www
    volumeMounts:
      - name: www-store
        mountPath: /usr/share/nginx/html
  volumes :
    - name : www-store
      persistentVolumeClaim :
        claimName : pvc1
</code></pre>
<p>Any help would be appreciated.</p>

<p>If running on a Rancher Kubernetes Engine (RKE) cluster, this problem can arise from the fact that each kubelet also runs as a container. Thus, it does not see the filesystem of the node it runs on.</p>
<p>The solution is to add extra bind mounts (for <code>kubelet</code> service) when configuring the cluster in <code>cluster.yml</code>. For example, to have <code>/data-1</code> on the node to be mounted as <code>/data-1</code> on the kubelet:</p>
<pre class="lang-yaml prettyprint-override"><code>services:
  ...
  kubelet: 
    extra_binds:
    - &quot;/data-1:/data-1&quot;
</code></pre>
