<p>I have a PersistenceVolumeClaim defined by</p>
<pre><code>apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: my-pvc
spec:
  storageClassName: &quot;standard&quot;
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi
</code></pre>
<p>And the containers section of the deployment yaml looks like this</p>
<pre><code>spec:
  containers:
  - name: my-container
    image: abc/xyz:1.2.3
    volumeMounts:
    - mountPath: /var/store
      name: mystore
  volumes:
  - name: mystore
    persistentVolumeClaim:
      claimName: my-pvc
</code></pre>
<p>I have a few questions about this set up.</p>
<ol>
<li>Do each replica of my pod get 1GB storage space (Assuming the PersistentVolume has enough space)?</li>
<li>How would this behave if the pod replicas are on different kubernetes nodes?</li>
</ol>
<p><strong>Edit</strong></p>
<p>I would like all replicas of my pod to have it's own storage (not a shared one). Is there a way to achieve this without creating a RWM volume?</p>

<blockquote>
<p>Do each replica of my pod get 1GB storage space (Assuming the PersistentVolume has enough space)?</p>
</blockquote>
<p>No. Since you use one <code>PersistentVolumeClaim</code>, you will get one <code>PersistentVolume</code>.</p>
<blockquote>
<p>How would this behave if the pod replicas are on different kubernetes nodes?</p>
</blockquote>
<p>It will not work, unless you use a volume type that can be used from multiple nodes at once, with <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes" rel="nofollow noreferrer">access mode</a> <code>ReadWriteMany</code> or <code>ReadOnlyMany</code>. But you have declared <code>ReadWriteOnce</code> in your PersistentVolumeClaim, so it will likely not work.</p>
<blockquote>
<p>I would like all replicas of my pod to have it's own storage (not a shared one). Is there a way to achieve this without creating a RWM volume?</p>
</blockquote>
<p>Yes, you can use <a href="https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/" rel="nofollow noreferrer">StatefulSet</a> instead of <code>Deployment</code>, and use the <code>volumeClaimTemplates:</code>-field.</p>
