Search code examples
kubernetesnfsdocker-volumegoogle-compute-engine

On GCE Kubernetes, how can I create volumes where multiple consumers can write?


K8S Volume documentation mentions that only a single consumer can write to GCE PD. What can be used on GCE for volumes where multiple consumers can write simultaneously, for example when hosting a private Docker registry?

I see an sample for creating NFS volume on GCE. Is there a straightforward solution that I am missing?


Solution

  • I followed this solution to

    1. create a GCE PD,
    2. host a NFS server with GCE volume mounted at "/exports"
    3. Use this NFS server as a volume

    This was easy to do. One change I made was to add storage-class "" to the GCE PD PV and PVC file as I did not have a default storage class.