Interview Prep/Monitoring & Observability/Prometheus storage, memory and cardinality

Prometheus is in CrashLoopBackOff with `no space left on device`

BeginnerTroubleshootingPrometheus storage, memory and cardinality
Answer

Likely causes → Retention by time only (--storage.tsdb.retention.time=30d) while ingest grew, so disk filled before old blocks expired.

Diagnose →

kubectl exec prometheus-k8s-0 -c prometheus -- du -sh /prometheus/* | sort -h
prometheus_tsdb_storage_blocks_bytes

Fix → Expand the PVC (if the StorageClass allows allowVolumeExpansion), or delete the oldest block directories, then add --storage.tsdb.retention.size=180GB (about 80–85% of the volume).

Prevent → Set both retention flags and alert on predict_linear(kubelet_volume_stats_available_bytes[6h], 24*3600) < 0.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Prometheus storage, memory and cardinality