简体   繁体   中英

How to create a dynamic persistent volume claim with ReadWriteMany access in GKE?

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 ?

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

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