How to set minimum garbage collection for kubelet on k3s #8525
-
Hi, I know I can set kubelet parameters on k3s using Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Yes, just use kubelet-arg. Passing these args to the kubelet may be deprecated but shows no signs of actually going away. |
Beta Was this translation helpful? Give feedback.
-
I am using the following command to set up my k3s cluster. But it is not cleaning up the unused images. For testing I just run 2 pods and then delete one of them but I can still see the image of the deleted pod when I do curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.27.3+k3s1 sh -s - \
--write-kubeconfig ~/.kube/config \
--write-kubeconfig-mode 600 \
--kubelet-arg "--image-gc-high-threshold=10" \
--kubelet-arg "--image-gc-low-threshold=5" |
Beta Was this translation helpful? Give feedback.
Yeah, its periodic, not immediate... those are the correct args but I think you might have unrealistic expectations around how aggressively images are cleaned up to reach the target disk utilization.