<p>i want to use local volume that is mounted on my node on path: /mnts/drive.
so i created a storageclass (as shown in documentation for local storageclass),
and created a PVC and a simple pod which uses that volume.</p>

<p>so these are the configurations used:</p>

<pre><code>kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: local-fast
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumer
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: mysampleclaim
spec:
  storageClassName: local-fast
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 3Gi
---
apiVersion: v1
kind: Pod
metadata:
  name: mysamplepod
spec:
  containers:
  - name: frontend
    image: nginx:1.13
    volumeMounts:
    - mountPath: "/var/www/html"
      name: myvolume
  volumes:
  - name: myvolume
    persistentVolumeClaim:
      claimName: mysampleclaim
</code></pre>

<p>and when i try to create this yaml file gives me an error, don't know what i am missing:</p>

<pre><code> Unable to mount volumes for pod "mysamplepod_default(169efc06-3141-11e8-8e58-02d4a61b9de4)": timeout expired list of unattached/unmounted volumes=[myvolume]
</code></pre>

<p>If you want to use local volume that is mounted on the node on <code>/mnts/drive</code> path, you just need to use <a href="https://kubernetes.io/docs/concepts/storage/volumes/#hostpath" rel="nofollow noreferrer">hostPath</a> volume in your pod:</p>

<blockquote>
  <p>A hostPath volume mounts a file or directory from the host node’s
  filesystem into your pod.</p>
</blockquote>

<p>The final <code>pod.yaml</code> is:</p>

<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: mysamplepod
spec:
  containers:
  - name: frontend
    image: nginx:1.13
    volumeMounts:
    - mountPath: "/var/www/html"
      name: myvolume
  volumes:
  - name: myvolume
    hostPath:
      # directory location on host
      path: /mnts/drive
</code></pre>
