Interview Prep/Monitoring & Observability/Grafana, Dashboards and Kubernetes Monitoring

How do you monitor persistent volume usage for StatefulSets?

BeginnerScenarioGrafana, Dashboards and Kubernetes Monitoring
Answer

Situation read → PVs fill silently; databases crash when full.

What I'd do →

  1. Use kubelet volume metrics: kubelet_volume_stats_used_bytes and kubelet_volume_stats_capacity_bytes.
  2. Alert predictively:
predict_linear(kubelet_volume_stats_available_bytes{namespace="prod"}[6h], 24*3600) < 0
  1. Also alert on inode exhaustion (kubelet_volume_stats_inodes_free).
  2. Enable allowVolumeExpansion on the StorageClass for quick fixes.

Why → Predictive alerts give time to expand before the outage.

Interview tip → Mention inodes; many forget them.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Grafana, Dashboards and Kubernetes Monitoring