Example: Volume Expansion for Dynamic Provisioning Using Container Storage Interface (CSI) Storage Plugin
About this task
The following
versions of the Container Storage Interface (CSI) Storage Plugin support a volume
expansion feature for dynamically provisioned volumes:
Volume expansion means you can increase the storage quota of volumes created by the CSI
driver. Note that the StorageClass must have
allowVolumeExpansion set to true for volume expansion to
succeed. For more information about volume expanssion, see Expanding Persistent Volume Claims.
To use volume expansion, increase the storage value and reapply the PersistentVolumeClaim
configuration. For example, in the following PVC configuration, to increase the storage
quota for the volume from 5G to 10G, change storage: 5G to storage:
10G, and run the kubectl apply -f <path_to_pvc>.yaml
command:
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: test-secure-pvc
namespace: test-csi
spec:
storageClassName: test-secure-sc
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5G