Interview Prep/Kubernetes/Nodes, kubelet and container runtime

A node shows `MemoryPressure` constantly even though Pods use little memory.

AdvancedTroubleshootingNodes, kubelet and container runtime
Answer

Likely causes → Something outside Pods uses the memory: a leaking system daemon (old log agent installed on the host, security agent), kernel slab growth, or page cache not counted as available on cgroup v1 in some cases.

Diagnose →

# On the node
free -m
ps -eo rss,comm --sort=-rss | head
sudo slabtop -o | head -15
cat /sys/fs/cgroup/kubepods.slice/memory.current 2>/dev/null

Fix → Fix or restart the leaking host process; reserve memory for system daemons with systemReserved so the kubelet accounts for them.

Prevent → Minimal immutable node images (Bottlerocket, AL2023) without extra host agents; agents run as DaemonSets with limits.

All Kubernetes questions

More on Nodes, kubelet and container runtime