What does DiskPressure really means and how it can be avoided in kubernetes during container creation?
Seemingly when I creating a new container on a node there is a high chance that it is crashing the whole node because of the pressure...
Failure Impact of a Down Kubernetes Cluster Even when the master node goes down, worker nodes may continue to operate and run the containers orchestrated on those nodes. If certain applications or pods were running on those master nodes, those applications and pods will go down.
Pods are evicted according to the resource, like memory or disk space, causing the node pressure. The first pods to be evicted are those in a failed state, since they are not running but could still be using resources. After this, Kubernetes evaluates the running pods.
Disk pressure is a condition indicating that a node is using too much disk space or is using disk space too fast, according to the thresholds you have set in your Kubernetes configuration.
From the documentation you'll find that DiskPressure
raises when:
Available disk space and inodes on either the node’s root filesytem or image filesystem has satisfied an eviction threshold
Learning about the conditions of your nodes whenever these issues occur is somewhat important (how much space/inodes are left, ...) and also learning about the related container images is important. This can be done with some basic system monitoring (see the Resource Usage Monitoring).
Once you know about the conditions, you should consider to adjust the --low-diskspace-threshold-mb
, --image-gc-high-threshold
and --image-gc-low-threshold
parameters of you kubelet, so that there's always enough space for normal operation, or consider to provision more space for you nodes, depending on the requirements.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With