How does Kubernetes GC detect disk usage?

2/28/2018

I have a Kubernetes node with a small root disk and a large disk plumbed into /var/lib/docker

Kubernetes does GC on disk images when the used space reaches X%. Whats it looking at though? I can't find it in the docs.

Just to clarify, if you've got / with 20GB of space and /var/lib/docker with a second disk of 100GB, if K8S looks a / the % free is much less, potentially than /var/lib/docker, but / doesn't change much where as the mapped in drive, does.

-- magicaltrout
kubernetes

1 Answer

2/28/2018

Configuration info for kubelet cleanup of unused images and containers is here:

https://kubernetes.io/docs/concepts/cluster-administration/kubelet-garbage-collection/

Default for X% in the question is 90%; default cleanup target is 80%.

-- Jonah Benton
Source: StackOverflow