Hello Rancher team, I have a Rancher cluster that ...
# general
a
Hello Rancher team, I have a Rancher cluster that is deployed on top of a Kubernetes K3s cluster. Currently, the disk usage on the worker VM/instance has reached 80%. Do you have any recommendations for the best cleanup practices to reduce disk usage for cleaning up logs on a VM/instance running K3s. I am using Ubuntu.
s
This is for general linux, but I use journalctl --vacuum-size=0B or journalctl --vacuum-time=1s often
docker system prune -f or crictl --prune can help too but dont know for k3s
h
have you looked at
imageGCHighThresholdPercent
and
imageGCLowThresholdPercent
https://kubernetes.io/docs/reference/config-api/kubelet-config.v1beta1/ You can also manually run
crictl rmi --prune
to remove unused container images to free up disk usage
a
Is it safe to run the following commands on a worker node?
sudo journalctl --vacuum-time=7d
sudo k3s crictl rmi --prune
h
I run
crictl rmi --prune
daily Never done the vacuum command
1