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