How to change Kubernetes garbage collection threshold values

8/9/2017

By default, image-gc-high-threshold and image-gc-low-threshold values are 90 and 80% respectively.

We want to change them to 80 and 70, How we can change the Kubernetes image garbage collection threshold values.

Thanks in advance.

-- Rahul Khengare
azure-container-service
garbage-collection
kubernetes

2 Answers

8/9/2017

Changing the garbage collection thresholds can be done using switches on the kubelet.

From the docs

--image-gc-high-threshold int32    The percent of disk usage after which image garbage collection is always run. (default 85)
--image-gc-low-threshold int32     The percent of disk usage before which image garbage collection is never run. Lowest disk usage to garbage collect to. (default 80)
-- coreypobrien
Source: StackOverflow

8/10/2017

Essentially you can override default user values as described in the documentation below.

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

-- sauryadas_
Source: StackOverflow