Kubelet watches inodes. Just not until it’s an emergency.
2 similar posts
- Kubernetes
- Kubelet
- containerd
- Prometheus
- ext4
AI Summary
An SRE investigation into why a Kubernetes node paged with NodeFilesystemFilesFillingUp despite having plenty of disk space. The article explains how ext4 inode allocation works, why small files like node_modules exhaust inodes long before disk blocks, how kubelet handles inode thresholds exclusively at the hard eviction floor (95% usage), and how to set up early Prometheus alerts and cleanup commands.
Key Takeaways
- Kubelet image garbage collection relies solely on byte thresholds (85% high, 80% low), never looking at file counts or inodes.
- Hard eviction for inodes sits at 5% free (95% used), meaning the first built-in kubelet intervention for file counts is also the most disruptive.
- Using `du --inodes -xS /var` helps pinpoint exact directories like containerd snapshot stores consuming millions of inodes.
Why it matters
Understanding how Kubernetes manages storage resources beyond simple byte percentages helps prevent unexpected node evictions and outages caused by high file counts, particularly in clusters running applications with dense dependency trees like node_modules.
Conversation0
What would you add from your experience?
Checking your session…
Every good conversation starts with one perspective.