<p>I'm learning Kubernetes, and trying to setup a cluster that could handle a single Wordpress site with high traffic. From reading multiple examples online from both Google Cloud and Kubernetes.io - they all set the "accessMode" - "readWriteOnce" when creating the PVCs.  </p>

<p>Does this mean if I scaled the Wordpress Deployment to use multiple replicas, they all use the same single PVC to store persistent data - read/write data. (Just like they use the single DB instance?) </p>

<p>The google example here only uses a single-replica, single-db instance - <a href="https://cloud.google.com/kubernetes-engine/docs/tutorials/persistent-disk" rel="nofollow noreferrer">https://cloud.google.com/kubernetes-engine/docs/tutorials/persistent-disk</a></p>

<p>My question is how do you handle persistent storage on a multiple-replica instance?</p>

user2006185
<p>ReadWriteOnce means all replicas will use the same volume and therefore they will all run on one node. This can be suboptimal.</p>

<p>You can set up ReadWriteMany volume (NFS, GlusterFS, CephFS and others) storage class that will allow multiple nodes to mount one volume. </p>

<p>Alternatively you can run your application as StatefulSet with volumeClaimTemplate which ensures that each replica will mount its own ReadWriteOnce volume.</p>
