GKE ReadOnlyMany - how to fill with content

7/16/2019

Hy,

How can i copy content on an readonlymany disk inside GKE?

Can i convert readwriteonce to readonlymany?

BR

-- Berndinox
google-cloud-platform
kubernetes

1 Answer

7/17/2019

Before changing access mode from ROX to RWO, make sure your volume is mounted to a single node (scale down to 1 replica).

Then just edit yaml of your PV object

kubectl edit pv <pv-name>

and set

accessModes:
  - ReadWriteOnce

Or, if you are using dynamically provisioned PersistentVolumes, you have to edit pvc rather than pv

-- A_Suh
Source: StackOverflow