Since the switch to containerd the containerd snapshot folder grows on my host:
/var/snap/microk8s/common/var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/...
Now there there are no inodes and space left on the host. With docker I used to regulary prune old stuff. But how can I cleanup this artifacts with containerd / ctr?
Thanks in advance!
Hannes
Hi @toxsick I do not have a good answer (for now) but here is what i know. We can see the running containers with:
microk8s.ctr -n k8s.io containers ls
We can then remove images with:
microk8s.ctr -n k8s.io images rm --sync "image_ref"
Also kubelet should be garbage collecting unused images: https://kubernetes.io/docs/concepts/cluster-administration/kubelet-garbage-collection/
Hi @ktsakalozos
thanks for your answer! I saw that, but there does not seam to be something easy right? I would like to lower the image-gc-high-threshold to something like 60%. Any idea where I can configure this in microk8s/kubelet?
Any idea where I can configure this in microk8s/kubelet?
You can edit /var/snap/microk8s/current/args/kubelet to add the arguments you please and then do a microk8s.stop, microk8s.start cycle.
Ohh that helps! Thanks!
Most helpful comment
You can edit
/var/snap/microk8s/current/args/kubeletto add the arguments you please and then do amicrok8s.stop,microk8s.startcycle.