Volume Expansion Process

Volume Expansion Process A workflow diagram generated by Archify. 01 / Expansion Request 02 / Actual Application StorageClass · Expansion allowed · Expansion Request StorageClass Expansion allowed Edit PVC · 10Gi → 20Gi · Expansion Request Edit PVC 10Gi → 20Gi CSI driver · ModifyVolume · Expansion Request CSI driver ModifyVolume EBS volume grows · 20Gi · Actual Application EBS volume grows 20Gi PV capacity updated · capacity 20Gi · Actual Application PV capacity updated capacity 20Gi File system grows · Online resize · Actual Application File system grows Online resize prereq request AWS API reflected resize Legend Kubernetes Objects Claim AWS Volume

Prerequisites

  • • The StorageClass must set allowVolumeExpansion: true for the request to be accepted
  • • You request expansion by raising the PVC's spec.resources.requests.storage
  • • Shrinking is not supported, so plan sizes rather than over-provisioning up front

Online versus offline

  • • With a recent kernel and CSI driver, expansion happens online while the pod runs
  • • Without online support, the pod must restart before the file system grows
  • • The PVC's FileSystemResizePending condition shows which stage it is in

Operational best practices

  • • Track usage with metrics such as kubelet_volume_stats_available_bytes
  • • Alert at an 80% threshold so you do not miss the moment to expand
  • • Expand incrementally rather than in one jump, and account for the 6-hour EBS modification cooldown