A Postgres StatefulSet pod crashed with "could not extend file "base/16384/2619": No space left on device". The PVC is 50Gi.
BeginnerTroubleshootingDisk, memory and CPU
Answer
Likely causes → The persistent volume filled up: data growth, WAL build-up, or bloat from tables that are never vacuumed.
Diagnose →
kubectl exec pg-0 -- df -h /var/lib/postgresql/data
kubectl get pvc data-pg-0 -o jsonpath='{.spec.resources.requests.storage}'
kubectl get storageclass gp3 -o jsonpath='{.allowVolumeExpansion}'
Fix → If the StorageClass has allowVolumeExpansion: true, edit the PVC size and the CSI driver grows the volume and filesystem online:
kubectl patch pvc data-pg-0 -p '{"spec":{"resources":{"requests":{"storage":"100Gi"}}}}'
kubectl get pvc data-pg-0 -w
Also update volumeClaimTemplates in your source of truth so new replicas match (the StatefulSet field itself is immutable; re-create the StatefulSet object with --cascade=orphan if needed).
Prevent → Alert on kubelet_volume_stats_available_bytes / kubelet_volume_stats_capacity_bytes < 0.2 and only use StorageClasses that allow expansion for databases.
More on Disk, memory and CPU
The app fails to write with "No space left on device", but `df -h` shows the volume is only 40% used.Beginner`df -h` says `/` is 100% full, but `du -sh /*` only adds up to 30% of the disk.BeginnerA server shows load average 40 on 8 cores, but `top` shows CPU 60% idle and the app is crawling.BeginnerPods are being evicted with "The node was low on resource: ephemeral-storage. Container app was using 18Gi, which exceeds its request of 0."IntermediateCI build agents running Docker fail with "no space left on device" while pulling images; `/var/lib/docker` is 95% full.IntermediatePostgres on a VM died overnight; `dmesg` shows "Out of memory: Killed process 2314 (postgres) total-vm:..., anon-rss:...".Intermediate