3

Currently GCEPersistentDisk does not support ReadWriteMany natively, there are other options like filestore which creates a NFS volume, but there are 2 problem here:

  1. minimum 1 TB size is needed to be created

  2. secondly its a manually effort of creating PVs and then PVCs

Whats the best solutions for dynamically allocating a claim request in GKE ?

Sanjay M. P.
  • 919
  • 1
  • 16
  • 33
  • https://medium.com/@Sushil_Kumar/readwritemany-persistent-volumes-in-google-kubernetes-engine-a0b93e203180#:~:text=Persistent%20Volumes%20in%20GKE%20are,by%20many%20nodes)%20access%20modes. – Harsh Manvar Jul 30 '21 at 06:23
  • Thanks @HarshManvar, Ive already taken a look at the post, but we need dynamic allocation of PVCs. – Sanjay M. P. Jul 30 '21 at 06:40
  • 1
    for that you can create the storage class and create the dynamic provision with NFS. – Harsh Manvar Jul 30 '21 at 07:03

1 Answers1

2

If you have requirement of dynamic provising with you can alos try using the Gluster FS or Minio.

here is one nice example using the GlusterFS dynamic provisioning : https://docs.openshift.com/container-platform/3.9/install_config/storage_examples/gluster_dynamic_example.html

you have to create the storageclass

kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: glusterfs
provisioner: kubernetes.io/glusterfs
parameters:
  resturl: "http://10.42.0.0:8080" 
  restauthenabled: "false"

and create the PVC with specific storageclass

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: gluster1
spec:
  accessModes:
  - ReadWriteMany
  resources:
    requests:
      storage: 30Gi
  storageClassName: glusterfs

Also, You can create Filestore file shares between 1 and 63.9 TiB and dynamic provisioning: https://cloud.google.com/community/tutorials/gke-filestore-dynamic-provisioning

Harsh Manvar
  • 27,020
  • 6
  • 48
  • 102