TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: K8s Cleaner – Roomba for Kubernetes

68 pointsby pescerosso5 months ago
Hello HN community!<p>I&#x27;m excited to share K8s Cleaner, a tool designed to help you clean up your Kubernetes clusters.<p>As Kubernetes environments grow, they often accumulate unused resources, leading to confusion, waste, and clutter. K8s-cleaner simplifies the process of identifying and removing unnecessary components.<p>The tool scans your Kubernetes clusters for unused or orphaned resources—including pods, services, ingresses, and secrets—and removes them safely. You can fully customize which resources to scan and delete, maintaining complete control over what stays and what goes.<p>Getting Started:<p>Visit <a href="https:&#x2F;&#x2F;sveltos.projectsveltos.io&#x2F;k8sCleaner.html" rel="nofollow">https:&#x2F;&#x2F;sveltos.projectsveltos.io&#x2F;k8sCleaner.html</a> and click the &quot;Getting Started&quot; button to try K8s-cleaner.<p>Key Features:<p>- Easy to Use: No complex setup or configuration required—perfect for developers and operators alike - Open Source: Modify the code to better fit your specific needs - Community Driven: We welcome your feedback, feature ideas, and bug reports to help improve K8s-cleaner for everyone<p>I&#x27;m here to answer questions, address feedback, and discuss ideas for future improvements.<p>Looking forward to your thoughts! And make sure your all you kubernetes clusters are sparkling clean for the holidays. :-)<p>Simone

13 comments

zzyzxd5 months ago
For resources that are supposed to be cleaned up automatically, fixing your operator&#x2F;finalizer is a better approach. Using this tool is just kicking the can down the road, which may cause even bigger problem.<p>If you have resources that need to be regularly created and deleted, I feel a cronjob running `kubectl delete -l &lt;your-label-selector&gt;` should be more than enough, and less risker than installing a 3rd party software with cluster wide list&#x2F;delete permission.
评论 #42456416 未加载
评论 #42458985 未加载
评论 #42459208 未加载
devops995 months ago
If you find yourself using something like this, you seriously fucked up as DevOps &#x2F; cloud admin &#x2F; whatever.
评论 #42455445 未加载
评论 #42456682 未加载
评论 #42455473 未加载
评论 #42457401 未加载
评论 #42457326 未加载
评论 #42455257 未加载
评论 #42455354 未加载
评论 #42457405 未加载
评论 #42455215 未加载
darkwater5 months ago
How does it work in an IaC&#x2F;CD scenario, with things like Terraform or ArgoCD creating and syncing resources lifecycle inside the cluster? A stale resource, as identified and cleaned by K8s Cleaner, would be recreated in the next sync cycle, right?
评论 #42455639 未加载
paolop5 months ago
I&#x27;ve been using it for a bit now and very happy with it. The stale-persistent-volume-claim detection has been almost a 100% hit in my case; it&#x27;s a real game-changer for cleaning up disk space.<p>Kubernetes clutter can quickly become a headache, and having a tool like this to identify and remove unused resources has made my workflow so much smoother.
S0y5 months ago
When I saw the headline I was pretty excited, but looking at your examples, I&#x27;m really curious about why you decided to make everything work via CRDs? Also having to write code inside those CRD for the cleanup logic seems like a pretty steep learning curve and honestly I&#x27;d be pretty scared to end up writing something that would delete my entire cluster.<p>Any reason why you chose this approach over something like a CLI tool you can run on your cluster?
评论 #42455245 未加载
评论 #42455979 未加载
评论 #42455428 未加载
siva75 months ago
Don’t let these naysayers here discourage you. I’ve used CCleaner on Windows 20 years ago, so why not finally now on my kube cluster.
empath755 months ago
why isn&#x27;t this just a cli tool? I don&#x27;t see any reason it needs to be installed on a cluster. There should at least be an option to scan a cluster from the cli.
评论 #42455654 未加载
评论 #42455265 未加载
caust1c5 months ago
So is this the first instance of a Cloud C-Cleaner then? You could call it CCCleaner!
fyodor05 months ago
Looking at other comments and drawing Windows parallel, I propose kkCleaner<p>Useful project nevertheless!
mia_villarreal5 months ago
Seems like a simple and effective tool!
kiney5 months ago
I&#x27;ve been saying for a while that most of the time we didn&#x27;t replace pets with cattle bit pet servers with pet clusters. The need for a tool like this proves my point
brianecox5 months ago
Sounds useful.
cjk5 months ago
I feel like the fact that this even needs to exist is a damning indictment of k8s.
评论 #42457529 未加载