-
Notifications
You must be signed in to change notification settings - Fork 0
container K8 management
Taken from the theme, Cleanup /var/lib/rancher/k3s/agent
sudo k3s crictl images
From https://github.com/k3s-io/k3s/issues/1900
https://github.com/k3s-io/k3s/issues/1900#issuecomment-644453072
kubernetes nodes automatically perform image garbage collection. You can find documentation on the default thresholds here: https://kubernetes.io/docs/concepts/cluster-administration/kubelet-garbage-collection/#user-configuration
You can tune these thresholds on your k3s nodes by adding arguments to the service command line:
--kubelet-arg=image-gc-high-threshold=85 --kubelet-arg=image-gc-low-threshold=80
If for some reason you want to muck about with deleting things manually, you can try:
sudo k3s crictl images
to see what images have been pulled locally
sudo k3s crictl rmi --prune
to delete any images no currently used by a running container
$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES