<p>Why cant I have a setup like below.
I want to map vol1 to a pod with different subpath has xyz and vol2 to the same pod with subpath abc.</p>
<pre><code>  volumes:
  - name:vol1
    persistentVolumeClaim:
      claimName: testclaim
  - name: vol2
    persistentVolumeClaim:
      claimName: testclaim
</code></pre>
<p>containers volume mounts:</p>
<pre><code>  volumeMounts:
    - name: vol1
      mountPath: /test/
      subPath: abc
    - name: vol2
      mountPath: /test2/
      subPath: xyz
</code></pre>
<p>What is the alternative for this kind of setup?</p>

Sourabh Ninawe
<p>Try this</p>
<pre><code>  volumeMounts:
    - name: vol1
      mountPath: /test
      subPath: abc
    - name: vol1
      mountPath: /test2
      subPath: xyz
volumes:
- name: vol1
  persistentVolumeClaim:
    claimName: testclaim
</code></pre>
