https://github.com/paralin/kubecleanup
A DaemonSet designed to cleanup Kubernetes clusters.
https://github.com/paralin/kubecleanup
Last synced: 8 months ago
JSON representation
A DaemonSet designed to cleanup Kubernetes clusters.
- Host: GitHub
- URL: https://github.com/paralin/kubecleanup
- Owner: paralin
- Created: 2015-11-02T05:07:13.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-11-02T05:09:09.000Z (over 10 years ago)
- Last Synced: 2025-07-05T03:42:21.154Z (8 months ago)
- Language: Shell
- Size: 121 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
kube-cleanup
===========
A simple example of a Kubernetes DaemonSet that cleans up old/unused images and containers in your cluster.
Old failed containers / unused images can quickly take up all of the space on cloud instances, sometimes consuming all available space and crashing the node.
A better implementation of this would take into consideration available space, pruning only the oldest unused resources when absolutely necessary, to preserve old container history and logs for sysadmins trying to debug tricky issues. This is **definitely not best practice**. A implementation of a cleanup manager in kubernetes would be ideal.
For now, though, this works on my cluster.
~ paralin
Usage
====
```
kubectl create -f cleanup-daemonset.yaml
```
DaemonSets are a very **very** beta feature and won't be enabled in your
cluster unless you use a very recent build with the feature enabled.