Live data from Hacker News

Show HN: K8s Cleaner – Roomba for Kubernetes

sveltos.projectsveltos.io

51–60 of 64 posts

Re: Show HN: K8s Cleaner – Roomba for Kubernetes

#51

Earlier quoted context omitted.

No one likes leaking resources, but it happens to the very best teams. It seems like a tool that can propose a good guess about where you landed is strictly useful and good?

> but it happens to the very best teams. I am very convinced it does not. I think where the apex between our viewpoints lies is what we recognize (or not) as "best" teams.

Sometimes you show up to your job and find that you have 10000 square pegs that need to go through a circular hole. You can over time fix this problem but sometimes you need a stopgap. You may or may not ascribe to the google SRE creed but the goal is to get stuff working today with what you have however ugly it may be. Some hacky tool to restart programs to fix memory a memory leak is sometimes necessary due to time constraints or being a stopgap. Migrations at large companies can take multiple years whereas I can install this tool with helm in approximately half a day.

Re: Show HN: K8s Cleaner – Roomba for Kubernetes

#52
post #23

For resources that are supposed to be cleaned up automatically, fixing your operator/finalizer is a better approach. Using this tool is just kicking the can down the road, which may cause even bigger problem. If you have resources that need to be regularly created and deleted, I feel a cronjob running `kubectl delete -l ` should be more than enough, and less risker than installing a 3rd party software with cluster wi…

Most of the times you don't own the operator/finalizer

And most of the times, when it is a shared cluster, you don't even know what else is being deployed.

Re: Show HN: K8s Cleaner – Roomba for Kubernetes

#53
post #24

Earlier quoted context omitted.

How should I discover the things that need deletion? Presumably running some sort of analysis tool in a dry-run mode would help, no?

https://github.com/yonahd/kor

It appears to cover all that kor covers and more. I like the flexibility of cleaner. Both useful tools IMHO.

Re: Show HN: K8s Cleaner – Roomba for Kubernetes

#54

Earlier quoted context omitted.

In that case I would use it in DryRun mode and have it generate a report. Then look at the report and if it makes sense, fix the terraform or ArgoCD configuration. More on report: https://gianlucam76.github.io/k8s-cleaner/reports/k8s-cleane...

Improve it! Teach it to figure out if the resource is managed by ArgoCD or FluxCD and then suspend reconciliation.

It is open source. The least we could do if we find something else useful would be to file an enhancement request. Be nice.

Re: Show HN: K8s Cleaner – Roomba for Kubernetes

#55

How does it work in an IaC/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?

In that case I would use it in DryRun mode and have it generate a report. Then look at the report and if it makes sense, fix the terraform or ArgoCD configuration. More on report: https://gianlucam76.github.io/k8s-cleaner/reports/k8s-cleane...

Nice, it's something already. But probably as someone else was saying, it would be cool to iterate and improve this.

Because, if you want to have a product to sell out of this (and I guess you do?), your n.1 client will be (IMO) big enterprises, which usually have a lot of cruft in their clusters and go after cost optimizations. But they also usually don't shove manifests in directly, they have at least one solution on top of it that takes care of resources lifecycle. So, IMO, if you want your product to be useful for those kind of customers, this is something that need to be improved.

Re: Show HN: K8s Cleaner – Roomba for Kubernetes

#57

Earlier quoted context omitted.

> but it happens to the very best teams. I am very convinced it does not. I think where the apex between our viewpoints lies is what we recognize (or not) as "best" teams.

Sometimes you show up to your job and find that you have 10000 square pegs that need to go through a circular hole. You can over time fix this problem but sometimes you need a stopgap. You may or may not ascribe to the google SRE creed but the goal is to get stuff working today with what you have however ugly it may be. Some hacky tool to restart programs to fix memory a memory leak is sometimes necessary due to time…

> Some hacky tool to restart programs to fix memory a memory leak is sometimes necessary due to time constraints or being a stopgap.

This makes sense for K8s resources that ARE still serving production traffic. But this overall thread is about a tool to remove applications ARE NOT serving production traffic.

> Migrations at large companies can take multiple years

Depends who is in charge and who management considers worth listening to (some of us don't struggle so hard in this area).

> I can install this tool with helm in approximately half a day.

A script I wrote to find unused resources took less than 10 minutes to write.

Re: Show HN: K8s Cleaner – Roomba for Kubernetes

#58

Earlier quoted context omitted.

> but it happens to the very best teams. I am very convinced it does not. I think where the apex between our viewpoints lies is what we recognize (or not) as "best" teams.

If you know how to do serious software without spilling any memory then you should write it up and collect the most significant Turing Award ever. Hackers would be immediately bifurcated into those who followed that practice and those who are helpless.

> If you know how to do serious software without spilling any memory

This thread is about K8s Pods (and other K8s resources) that have been sitting idle, not memory leaks in software.

As far as "spilling" memory, the problem has already been solved by Rust which does not do garbage collection because it has static memory mapping. Does this mean egregious amounts of memory won't be used by some Rust programs? No. But unlike languages with garbage collection, where Rust is using that memory it is actually doing something with that memory.

Re: Show HN: K8s Cleaner – Roomba for Kubernetes

#59
post #40

Earlier quoted context omitted.

It's really hard to parse what you are trying to say in the middle of this colorful imagery and quotations, but if you are spinning up a new Kubernetes cluster (and AWS/GCP account) per deployment, it's obvious you don't need this tool.

Specifically, leaving the corporate political dynamics aside, we move the workloads to the deployments that are up to standard and then archive+drop the old ones. Very simple.

A more cynical man than I would say that if you need to recreate all your workloads on a new cluster to bring them up to standard, "you seriously fucked up as DevOps / cloud admin / whatever"
Post reply on HN