kiwix / operations

Kiwix Kubernetes Cluster
http://charts.k8s.kiwix.org/
7 stars 0 forks source link

Setup k8s garbage collection on all nodes #285

Open benoit74 opened 1 month ago

benoit74 commented 1 month ago

Since we keep deploying new images, cluster nodes keep pilling up Docker images / layers on its filesystem.

This is not automatically deleted since it is hard to know for the kubelet when an image is not needed anymore and when it might be needed again few moments later.

In https://github.com/kiwix/operations/issues/163#issuecomment-1914807806, we've setup necessary configuration to cleanup services node automatically: if configuration works as expected, when disk usage goes above 80%, k8s will clean unused image until disk usage goes below 50%.

services node is now getting close to the point where it will use again more than 80% of its disk, so we are close to being able to confirm things work as expected.

Once done, we need to deploy this configuration on all k8s cluster nodes, and add it to the k8s nodes deployment procedure.

Tasks: