Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DiskPressure crashing the node

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...

like image 481
eesdil Avatar asked Mar 03 '17 10:03

eesdil


People also ask

What happens when a Kubernetes node goes down?

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.

What is the reason for pod eviction?

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.

What is Diskpressure?

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.


1 Answers

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.

like image 164
pagid Avatar answered Sep 29 '22 06:09

pagid