How do you expand a PVC?
IntermediateConceptConfiguration & Storage
Answer
The StorageClass must set allowVolumeExpansion: true; edit the PVC's spec.resources.requests.storage to a larger value; the CSI driver resizes the volume, and the filesystem is grown online (or at next mount). Shrinking is not supported.
kubectl patch pvc data -p '{"spec":{"resources":{"requests":{"storage":"50Gi"}}}}'
kubectl get pvc data -w
More on Configuration & Storage
What is a ConfigMap and how can a Pod consume it?BeginnerWhat is a Secret and is it secure by default?BeginnerWhat are the common Secret types?BeginnerWhat is a Volume and how does it differ from a container filesystem?BeginnerWhat is `emptyDir` and when is it used?BeginnerWhat are PersistentVolume (PV), PersistentVolumeClaim (PVC) and StorageClass?Beginner