<p>I have got the local persistent volumes to work, using local directories as mount points,  storage class, PVC etc, all using standard documentation. </p>

<p>However, when I use this PVC in a Pod, all the files are getting created in the base of the mount point, i.e if <code>/data</code> is my mount point, all my application files are stored in the <code>/data</code> folder. I see this creating conflicts in the future, with more than one application writing to the same folder. </p>

<p>Looking for any suggestions or advice to make each PVC or even application files of a Pod into separate directories in the PV. </p>

<p>If you store your data in different directories on your volume, you can use subPath to separate your data into different directories using multiple mount points. </p>

<p>E.g.</p>

<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: podname
spec:
    containers:
    - name: containername
      image: imagename
      volumeMounts:
      - mountPath: /path/to/mount/point
        name: volumename
        subPath: volume_subpath
      - mountPath: /path/to/mount/point2
        name: volumename
        subPath: volume_subpath2
    volumes:
    - name: volumename
      persistentVolumeClaim:
        claimName: pvcname
</code></pre>
