<p>I'm currently trying to create a GKE cluster and would like to be able to scale my PostgreSQL pods beyond 1 active instance but I'm getting stuck on the read-write permission of my volume is there a way to get readwritemany to work in GKE autopilot?
a hot spare for my PostgreSQL pod would also be helpful if that is possible.
thank you for the advice in advance.</p>

Alex Skotner
<p>IIUC you're unable to use Google's (Compute Engine's) Persistent Disks as <code>ReadWriteMany</code>. This may be documented on <a href="https://cloud.google.com" rel="nofollow noreferrer"><code>cloud.google.com</code> </a> but I was unable to find it.</p>
<p>See Kubernetes' documentation for <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes" rel="nofollow noreferrer">Access Modes</a> and specifically <code>GCEPersistentDisk</code>. These support <code>ReadWriteOnce</code> and <code>ReadOnlyMany</code> but <strong>not</strong> <code>ReadWriteMany</code>.</p>
<p>There may be other ways but, one (Goole-supported) way you can get <code>ReadWriteMany</code> on GCP is to use Filestore. See <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/persistent-volumes/filestore-csi-driver" rel="nofollow noreferrer">Using the Filestore CSI driver</a>.</p>
<p>For completeness (!) another way would be to use a PostgreSQL service such as <a href="https://cloud.google.com/sql/docs/features#postgres" rel="nofollow noreferrer">Cloud SQL for PostgreSQL</a></p>
