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.
IIUC you're unable to use Google's (Compute Engine's) Persistent Disks as ReadWriteMany
. This may be documented on cloud.google.com
but I was unable to find it.
See Kubernetes' documentation for Access Modes and specifically GCEPersistentDisk
. These support ReadWriteOnce
and ReadOnlyMany
but not ReadWriteMany
.
There may be other ways but, one (Goole-supported) way you can get ReadWriteMany
on GCP is to use Filestore. See Using the Filestore CSI driver.
For completeness (!) another way would be to use a PostgreSQL service such as Cloud SQL for PostgreSQL