Kubelet can evict Pods when a node is under resource pressure.
DiskPressure indicates that a relevant filesystem has crossed a configured disk-space or inode threshold.Diagnose the node
bash_snippet
Bash · 5 lines|
| kubectl describe node <node-name> |
| kubectl describe pod <pod-name> -n <namespace> |
| df -h |
| df -i |
| sudo journalctl -u kubelet -b --no-pager |
Check the node and image filesystems, logs, container runtime storage, and inode usage. Image garbage-collection thresholds and Pod eviction thresholds are separate settings; an 85% image usage log does not by itself prove an eviction threshold was crossed.
Recover space safely
Identify what consumes disk space and use the container runtime's supported cleanup and garbage-collection mechanisms. Archive or remove only data confirmed safe to delete, or expand the filesystem. Avoid indiscriminate
docker system prune: it can remove resources needed by other workloads, and many clusters do not use Docker as their runtime.Understand eviction thresholds
Kubelet can monitor signals such as
memory.available, nodefs.available, imagefs.available, inode availability, and PID availability. Hard thresholds trigger immediate eviction once met; soft thresholds require the signal to persist for the configured grace period. Available signals and defaults depend on the Kubernetes version and filesystem layout.evictionMinimumReclaim can require extra capacity to be reclaimed beyond a threshold. Review the effective kubelet configuration and all relevant thresholds before changing it: overriding only some settings may affect other defaults depending on configuration. Soft thresholds require corresponding grace periods.Configuration changes and kubelet restarts affect workloads. Follow your cluster's maintenance procedure, back up configuration, and verify node conditions and workloads after recovery.
✦ 卷终 · 柯航存卷 ✦