Cleans up exited containers, dangling images/volumes and unused images on each k8s nodes, running as a DaemonSet.
kubectl apply -f k8s-docker-clean.yml
you can set DOCKER_CLEAN_INTERVAL
to modify the interval when it cleans up; defaults to 12 hours (43200s).
- Based on docker server version on k8s nodes, custom docker images tag version on images (17, 18, 19, 20), or just use latest for lastest version of docker
- Based on k8s version custom Daemonset apiVersion or just use default apps/v1