A Kubernetes operator that deletes evicted pods
Sometimes an application can have a severe memory leak, which will cause it to consume more and more RAM over time, and eventually get evicted. Evicted pods are not cleaned up automatically, which creates visual noise in CLI output and tools like ArgoCD. This tool is a quick fix for such problem.
The heart of this tool is a small piece of Go code, which scans all namespaces for pods with Evicted
in their status, and deletes them.
This code is run as a Kubernetes CronJob.
The recommended way of using Kleaner is installing it using Helm:
helm install kleaner helm/kleaner
You can also use tools like ArgoCD or Flux.
There are a few variables exposed through values.yaml
file:
interval
(valid values: 1–59) — how many minutes to wait between runsnamespaces
— list of namespaces to run in, defaults to all namespaces if not specifieddebug
— if something works not as you expected, this can give you more insight (Go knowledge advised)
Initial release