Skip to content

Create PVC across Kubernetes workers#

HA MSR requires a Persistent Volume Claim (PVC) that can be shared across all worker nodes.

Note

MSR 4 can use any StorageClass and PVC that you configure on your Kubernetes cluster. The following example sets cephfs up as your default StorageClass. For more information, see Storage Classes in the official Kubernetes documentation.

  1. Create a StorageClass, the specifics of which depend on the storage backend you are using. The following example illustrates how to create a StorageClass class with a CephFS backend and Ceph CSI:
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: cephfs
  annotations:
   storageclass.kubernetes.io/is-default-class: "true"
provisioner: cephfs.csi.ceph.com
parameters:
  clusterID: <cluster-id>
  1. Run kubectl apply to apply the StorageClass configuration to the cluster, in the appropriate namespace.

  2. Create the PVC:

   apiVersion: v1
   kind: PersistentVolumeClaim
   metadata:
     name: shared-pvc
   spec:
     accessModes:
       - ReadWriteMany
     resources:
       requests:
         storage: 10Gi
     storageClassName: cephfs
!!! note

   The `.spec.storageClassName` references the name of the
   `StorageClass` you created above.
  1. Run kubectl apply to apply PVC to the cluster, in the appropriate namespace.