Skip to content

Commit 5620ca8

Browse files
committed
k3s: Document tuning kubernetes image cache
When we aren't using disk on the host for anything else, kubernetes can simply use as much of the disk as it wants for caching images. The default for this is upto 85%. However, since we *do* use the disk for our dind, we want to tune this to take up only half that size. I've already applied this to the 2i2c-hetzner node Follow-up to jupyterhub#3229
1 parent ca8663b commit 5620ca8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

docs/source/deployment/k3s.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,16 @@ config of _disabling traefik_ that comes built in. We deploy nginx as part of ou
2727
do not need traefik.
2828

2929
1. Create a Kubelet Config file in `/etc/kubelet.yaml` so we can
30-
tweak various kubelet options, including maximum number of pods on a single
31-
node:
30+
tweak various kubelet options, including maximum number of pods on a single node and when to cleanup unused images:
3231

3332
```yaml
3433
apiVersion: kubelet.config.k8s.io/v1beta1
3534
kind: KubeletConfiguration
3635
maxPods: 300
36+
# Clean up images pulled by kubernetes anytime we are over
37+
# 40% disk usage until we hit 20%
38+
imageGCHighThresholdPercent: 40
39+
imageGCLowThresholdPercent: 20
3740
```
3841
3942
We will need to develop better intuition for how many pods per node, but given we offer about

0 commit comments

Comments
 (0)