← Back to snippets

Resize PVCs Dynamically in Kubernetes

January 10, 2026Salih Kayiplar

kubernetes
storage
pvc
azure

Check if StorageClass supports expansion

kubectl get sc
# Look for ALLOWVOLUMEEXPANSION = true

Check current PVC size

kubectl get pvc data-loki-write-0 -n logging -o jsonpath='{.spec.resources.requests.storage}'

Patch the PVC to new size

kubectl patch pvc data-loki-write-0 -n logging \
  -p '{"spec":{"resources":{"requests":{"storage":"100Gi"}}}}'

Verify

kubectl get pvc data-loki-write-0 -n logging
# STATUS should stay "Bound", CAPACITY should update

Gotcha

  • You can only increase size, never shrink
  • Azure Disk CSI: online expansion works, no pod restart needed
  • If PVC shows FileSystemResizePending condition, restart the pod using it
  • Some older provisioners require the pod to be deleted so the volume can detach, resize, and reattach
  • allowVolumeExpansion must be true on the StorageClass before you try to patch

Ready to scale your cloud infrastructure?

Let's discuss how CloudCops can help you build secure, scalable, and modern DevOps workflows. Schedule a free discovery call today.