简体   繁体   中英

can i make a volume on GKE (with autopilot) that can use ReadWritemany?

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

Compute engine persistent disk does not support ReadWriteMany access mode.

GKE Autopilot cluster supports StorageType "NFS" and by default installed with Filestore CSI addon . It is important that you do not perform nfs mount in your container because Autopilot will reject privileged pod, see here for a quick guide how to use it and how much it can cost you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM