This example shows how to resize BSU persistence volume using volume resizing features.
Note
- BSU has a limitation with volume modification only when state is available. Refer to API documentation for more details.
-
Add
allowVolumeExpansion: true
in the StorageClass spec in example manifest to enable volume expansion. You can only expand a PVC if its storage class’s allowVolumeExpansion field is set to true -
Deploy the example:
kubectl apply -f specs/
- Verify the volume is created:
kubectl get pv
- Expand the volume size by increasing the capacity in PVC's
spec.resources.requests.storage
:
kubectl edit pvc -n resizing-p bsu-claim
Save the result at the end of the edit.
- Verify that the persistence volume are resized:
kubectl get pv
You should see the new value relfected in the capacity fields.
- Cleanup resources:
kubectl delete -f specs/