AT&T KubeKleaner targeted applications whose containers kept failing and restarting, a condition Kubernetes reports as CrashLoopBackOff. After a configured expiry, it could remove the failing deployment and associated resources such as Services and Ingress routes. That was a policy for discarding failing environments, not a repair tool. This distinction matters because a temporary dependency outage could otherwise lead to deletion of an application's routing and configuration.
Current guidance
The recovered path is spelled kubecleaner, but its upstream is att/kubekleaner. This Java service periodically identifies deployments with containers in CrashLoopBackOff. The README describes tracking a crashLoopDetectionTime label and, after expiry, deleting associated deployments, ReplicaSets, pods, services, ingress and horizontal autoscalers.
That is a destructive retention policy, not a repair for the cause of a crash. A temporary database outage or bad rollout could otherwise lead to removal of a service’s public routing and scaling resources. Establish exactly how resources are associated and how a return to Running resets the recorded condition.
Before considering adoption, create a read-only inventory of what the configured rule would select. Preserve logs and deployment configuration, define protected namespaces and verify interaction with GitOps, which may recreate deleted objects repeatedly. Exercise expiry and recovery with disposable workloads, including partial failures. This review found the original deletion model but did not establish current Kubernetes compatibility or an ongoing support commitment; use the historical configuration as evidence to assess, not an approved cleanup policy.
Historical upstream link check · 2026-10-09
The recorded upstream address responded successfully (HTTP 200) on 2026-10-09. GitHub does not mark att/kubekleaner archived or disabled; this does not establish active maintenance, support or compatibility. Link availability does not certify the historical installation instructions or current security support.
Website availability is separate from project, chart and image support. Use the current guidance and primary sources on this page to assess the distribution.
Historical Kubedex content
Original publication: 2018-09-25T04:11:49+00:00. Preserved for context. Commands, versions, prices and results below reflect the original research.
KubeKleaner (short for Kubernetes Kleaner) is a Java application built on the Spring Boot framework and the AT&T Java Service Container (AJSC).
KubeKleaner utilizes Spring Boot’s scheduled task functionality to leverage the Kubernetes API for deleting failing microservice deployments and their downstream resources based on a configurable expiration time.
Cleanup Process
The cleanup process is configurable but by default happens once daily. The Kubernetes clusters that KubeKleaner can reach is configured in the application’s properties file.
The cleanup process loops through all pods in the specified cluster(s) and works as follows on each iteration:
- If pod is in a CrashLoopBackOff state, add current timestamp as a label (named “crashLoopDetectionTime”) to its associated deployment resource
- If timestamp label is on deployment resource and the pod now is in a Running state, remove timestamp label from its associated deployment resource
- If timestamp label is on deployment resource and is older than the configured expiration and the pod is still in a CrashLoopBackOff state, delete all associated Kubernetes resources (deployment, replica set, pod, service, ingress, and hpa)
The above strategy is implemented in CleanupServiceImpl.java.
Defaults
As configured by default, KubeKleaner runs once daily at 10:00 A.M. PST.
The expiration date for Kubernetes resources is by default set for one week. This can be made shorter or longer via the “numWeeks” environment variable as found in application.yml.
Notifications
Upon a successful cleanup by KubeKleaner, a HipChat notification (if configured) will be sent to a chosen HipChat room with the following information tied to the deleted resources:
- Service name
- Namespace
- Kubernetes cluster
You can read more about kubecleaner in this blog post.
The post kubecleaner appeared first on kubedex.com.
Sources & further reading
Spotted something that needs another look?
Help improve this page →