For those that are using microk8s for production, you could be interested in a prune utility that would remove images unused by current containers (like docker system prune). The microk8s ctr utility do not provide such feature.
My experience is that images are quickly stacking and I am not sure any garbage collector is taking care of that.
The docs recommend avoiding external GC tools: “You should avoid using external garbage collection tools, as these can break the kubelet behavior and remove containers that should exist.”
Thank you! crictl was the solution for me;
I recovered more than 100GB of storage. @bispaj, I spent a couple of hours trying to figure out how to get GC to work the way I wanted in MicroK8s.
The Kubernetes documentation isn’t always helpful for MicroK8s
Well, I was looking for some kind of kubelit yaml config file, but I didn’t found!
Your example is what I was looking for.
Great, I will try to use your example!
Thank you for sharing.