Dynamic provisioning

Administrators use dynamic volume provisioning to create storage volumes on-demand.

Do the following steps:
  1. Create a traditional storageClass or consistency-group-based storageClass. For more information, see Storage class.
  2. Apply the following configuration:
    kubectl apply -f storageclass.yaml
  3. Use this storageClass to create a persistent volume claim (PVC), as shown in the following example:
    # cat pvc.yaml
    
    apiVersion: v1
    kind: PersistentVolumeClaim
    metadata:
      name: scale-fset-pvc
    spec:
      accessModes:
      - ReadWriteMany
      resources:
        requests:
          storage: 1Gi
      storageClassName: [name_of_your_storageclass]
    Modify the PVC name, storage, and storageClassName values according to your requirement.
  4. Create a PVC by issuing the following command:
    kubectl apply -f pvc.yaml