kind-control-plane fails to cleanup snapshots in a timely manner [SOLVED] #2865
Labels
kind/bug
Categorizes issue or PR as related to a bug.
triage/duplicate
Indicates an issue is a duplicate of other open issue.
What happened:
My docker.img was filling up and running out of space over time on Unraid OS.
What you expected to happen:
Old containers/images deployed to the cluster would be cleaned up.
How to reproduce it (as minimally and precisely as possible):
Deploying containers overtime would fill up the snapshotter directory with snapshots I believe. I'm unclear about reproduction exactly, this may be a simple case of provisioning and removing several deployments in a row, and seeing that space is not cleared.
Anything else we need to know?:
This may be an upstream issue, I looked into garbage collection in kubernetes. My deployment does not have crictl installed. But I was able to resolve the issue with a periodic cron job that runs like so:
This does prune old snapshots which doesn't seem to happen automatically. I've seen this drop the space usage of the kind-control-plane volume in docker. The space was being taken up in the io.containerd.snapshotter directory. I was able to correctly diagnose this by going through the kind-control-plane volume until i hit upon folders that were taking large amounts of space. Before running pruning, this folder was filling up with a huge amount of snapshots.
I understand garbage collection is in flux as kubectl is transitioning to a new ownership model. But i thought I would post this information as a fix as well if it can be helpful to anyone or it can be addressed in some manner.
Environment:
kind version
): v0.12.0 go1.17.8 linux/amd64kubectl version
):docker info
):/etc/os-release
):The text was updated successfully, but these errors were encountered: