https://github.com/cpfriend1721994/k8s-docker-clean
Cleans up exited containers, dangling images/volumes and unused images on each k8s nodes, running as a DaemonSet.
https://github.com/cpfriend1721994/k8s-docker-clean
docker dockerfile kubernetes
Last synced: 10 months ago
JSON representation
Cleans up exited containers, dangling images/volumes and unused images on each k8s nodes, running as a DaemonSet.
- Host: GitHub
- URL: https://github.com/cpfriend1721994/k8s-docker-clean
- Owner: cpfriend1721994
- License: gpl-3.0
- Created: 2021-06-02T06:57:36.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-06-02T15:13:51.000Z (about 5 years ago)
- Last Synced: 2025-07-12T01:07:26.490Z (about 1 year ago)
- Topics: docker, dockerfile, kubernetes
- Language: Shell
- Homepage: https://hub.docker.com/r/tunnm/k8s-docker-clean
- Size: 23.4 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## k8s-docker-cleanup
Cleans up exited containers, dangling images/volumes and unused images on each k8s nodes, running as a DaemonSet.
### Deployment
``` bash
kubectl apply -f k8s-docker-clean.yml
```
### Environment Variables
you can set `DOCKER_CLEAN_INTERVAL` to modify the interval when it cleans up; defaults to 12 hours (43200s).
### Notes
- 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**