Better HN
topnewbestaskshowjobs
Log inSign up

Telemaco019

38 karma · joined Jun 8, 2022 (4y ago) · 15 submissions

Submissions

1.

Kubesafe now shows how often it saved you from targeting the wrong cluster(github.com ↗)

1 points · by Telemaco019 · 1y ago · discuss

2.

Sqlalchemy-tenants: Because "oops, forgot WHERE tenant= " is not fun(github.com ↗)

3 points · by Telemaco019 · 1y ago · discuss

3.

Show HN: Sqlalchemy-tenants – Because "oops, forgot WHERE tenant= " is not fun(github.com ↗)

1 points · by Telemaco019 · 1y ago · discuss

comment 2y ago · link · parent

Absolutely! kubesafe is simply a wrapper, so you can use it with any Kubernetes tool by passing the tool as the first argument to kubesafe.

Example with kubecolor:

`kubesafe kubecolor get pods --all-namespaces`

comment 2y ago · link · parent

I think it’s a tradeoff between safety and speed. Having only the CI/CD with production access can significantly slow you down, especially in the early stages when you’re focused on the product and still building out your tooling/infrastructure.

comment 2y ago · link · parent

Cool project, I didn't know it. I love the idea, thanks for sharing it!

comment 2y ago · link · parent

I also have it in my zsh config, but that didn’t stop me from screwing up in the past. Having an active confirmation prompt for potentially risky commands is what works best for me

comment 2y ago · link · parent

Got burned too, we've all been there I guess :)

I also tried to avoid current context initially, but it just slowed me down. Switching between clusters is so much easier with the current context and kubectx.

That’s why I built kubesafe. In this way I can keep using the current context without worrying about screwing up. If I accidentally target the wrong context, at least I get a warning before executing the command.

The only hassle now is remembering to add new prod contexts to the safe list, but that’s about to change with regex support coming soon :)

comment 2y ago · link · parent

You're welcome! And thanks again for the feedback!

comment 2y ago · link · parent

Thanks Robert! Yes, you can achieve this with ACLs in Kubernetes, but it requires setting up multiple Roles and contexts. Even then, you might accidentally switch to a higher-permission Role and accidentally run a risky command, thinking you're in a different cluster or using a low-permission user.

Kubesafe is just an extra safety net to prevent those kind of accidents :)

comment 2y ago · link · parent

Thanks for the feedback John! You're right, that's pretty much it :)

I developed kubesafe because (1) I was tired of tinkering with shell aliases and scripts (especially when I wanted to define protected commands) and (2) I needed something that worked smoothly with all Kubernetes tools like kubectl, helm, kubecolor, etc.

Kubesafe is just a convenient way to manage protected commands and contexts. Nothing too fancy!

Btw - I also found a kubectl plugin written in Bash that’s similar to what you mentioned, in case you're interested: https://github.com/jordanwilson230/kubectl-plugins/blob/krew...

12.

Kubesafe: Never run Kubernetes commands on the wrong cluster again(github.com ↗)

73 points · by Telemaco019 · 2y ago · 48 comments

13.

Launching kubesafe: Your safety net for managing multiple Kubernetes clusters(github.com ↗)

2 points · by Telemaco019 · 2y ago · discuss

14.

Duplik8s: New kubectl plugin to duplicate Kubernetes resources(github.com ↗)

2 points · by Telemaco019 · 2y ago · discuss

15.

Show HN: Nos – Open-Source to Maximize GPU Utilization in Kubernetes(github.com ↗)

2 points · by Telemaco019 · 3y ago · discuss