Interview Prep/Kubernetes/Configuration, Secrets and storage

You need to resize a PVC. How?

BeginnerScenarioConfiguration, Secrets and storage
Answer

Situation read → A database volume is 90% full.

What I'd do →

  1. Verify the StorageClass has allowVolumeExpansion: true
  2. kubectl patch pvc data -p '{"spec":{"resources":{"requests":{"storage":"200Gi"}}}}'
  3. Watch kubectl get pvc and the condition FileSystemResizePending
  4. Online expansion works for most CSI drivers without restarting the pod
  5. Remember you cannot shrink a PVC

Why → The CSI driver expands the backing volume and the kubelet grows the filesystem.

Interview tip → Mention EBS limit: one modification per volume every 6 hours.

All Kubernetes questions Roadmap: Kubernetes core

More on Configuration, Secrets and storage