How to setup a ReadWriteMany and ReadWriteOnce StorageClass


Using microk8s, 1.18.6 stable. I would like to create a storage class to mimic a model on GKE:

$ helm install stable/nfs-server-provisioner

And then create a Storage class using this YAML:

kind: StorageClass
    app: nfs-server-provisioner
    chart: nfs-server-provisioner-0.3.2
    release: nfs
    name: nfs
- vers=4.1
- noatime
provisioner: cluster.local/nfs-nfs-server-provisioner
reclaimPolicy: Delete
volumeBindingMode: Immediate

QUESTION 1: Would the below YAML for microk8s support ReadWriteMany (RWM)? What should I do to match as close as possible the above config for GKE?

kind: StorageClass
  name: myrwm-storage
reclaimPolicy: Delete
volumeBindingMode: WaitForFirstConsumer

QUESTION 2: How to create a ReadWriteOnce StorageClass for microk8s?

MicroK8s storage is actually a hostpath, so it only sticks to one node. Neither ReadWriteMany or ReadWriteOnce matters.
If you are running a multinode MicroK8s cluster, you should choose something like OpenEBS or Rook ceph. Though never tried OpenEBS, i heard its a lot easier to install than Rook ceph.

Cool thanks, would like to mark your answer as “accepted answer” but look like there is not such feature on this board.