Live data from Hacker News

K3sup – bootstrap K3s over SSH in < 60s

github.com

51–55 of 55 posts

Re: K3sup – bootstrap K3s over SSH in < 60s

#51

I'm trying to understand why people are spinning up so many k8s clusters that they need a tool to do it for them? I have one. And it's managed. I don't think there's significant cost savings to going unmanaged, but maybe. Even so, why would I need a ton of them?

> And it's managed. Can’t use cloud stuff on-prem and also if your clients have a server room of their own. Same for homelab. Also it’s nice not to shift the pets attitude from servers to clusters and instead treat everything as cattle - provided you have backups of persistent data and the config versioned in a Git repo and there’s maybe some Ansible in the mix, being able to recreate an environment in the case of a…

> treat everything as cattle

The cluster isn't that hard to recreate if things go south. Everything is in YAML configs already. And since I'm managed, it's just a few clicks in DigitalOcean to create a new cluster. And actually, I think I can create clusters through their CLI too, so if I did want to automate it, it's already ready to go. So I'd say I'm cattle-ready, but too cheap to pay for more cattle.

I nearly went Docker Compose/Swarm by accident when I was just getting started. I knew I wanted to dockerize my app but then couldn't figure out how to get it into prod. Then I found out people don't actually use Docker Compose for prod it seems and eventually stumbled into Kubernetes. It took a few weeks to wrap my head around, but I'm happy with it now.

Once you have a nice set up, I'd say it's pretty simple to maintain. DevSpace is fantastic for development, and then for deployment I just wrote a little script which builds my images, updates the kustomize with new images and applies the manifests. Pretty simple.

Re: K3sup – bootstrap K3s over SSH in < 60s

#52
post #45

Earlier quoted context omitted.

> And it's managed. Can’t use cloud stuff on-prem and also if your clients have a server room of their own. Same for homelab. Also it’s nice not to shift the pets attitude from servers to clusters and instead treat everything as cattle - provided you have backups of persistent data and the config versioned in a Git repo and there’s maybe some Ansible in the mix, being able to recreate an environment in the case of a…

Glad to hear you prefer Docker Swarm/Compose, I feel it’s a solid tool for when you need some of the more complex multi server deployments, and helps you avoid all the costs and complexities around K8s. Plus, running docker compose in development and docker swarm in production feels like the closest you can get to having your development environment match your production environment.

> Plus, running docker compose in development and docker swarm in production feels like the closest you can get to having your development environment match your production environment.

I run Minikube in Podman for dev. And then I use kustomize to customize dev, staging and prod environments. The environments are 99% the same, they just have different env vars and memory limits.

Re: K3sup – bootstrap K3s over SSH in < 60s

#53
post #47

Earlier quoted context omitted.

My primary use case for K3s is small machines, cheap VPS, Pi, etc. Would love to hear from folks who have had success with Talos in those spaces but last time I gave it a shot the welded shut hood prevented me from doing the little tweaks necessary to get running in those environments. In the cloud or on prem I suspect folks are having better luck than I did, but also open to being wrong about this.

>prevented me from doing the little tweaks necessary to get running in those environments. It's a bit of a mindshift change but essentially whenever you feel the urge to make such a tweak...you've strayed off the golden path & are attempt to do something the wrong way (in Talos world). I came from k3s so was very used to the whole tweaks spiel too. Where you do need a custom config pipe in patch commands, not modify…

> you've strayed off the golden path & are attempt to do something the wrong way (in Talos world).

In this case the urge to make a tweak is synonymous with the urge to make the product _function_.

I admire their dedication to the schtick, but the upshot is that since you cannot reach inside to make Talos actually work in environments that aren't supported by that golden path, running the product on many devices is "Talos Wrong".

That's their perrogotive, but it's obnoxious in a "Windows 11 doesn't work on your perfectly functional laptop" kinda way.

Re: K3sup – bootstrap K3s over SSH in < 60s

#54
post #34

Earlier quoted context omitted.

I implemented a system that included the OP functionality (plus a whole lot more.) It was for on-premise deployment at customers. It can also be used to spin up stand-alone instances of our system in the cloud, for development, testing, etc. While you could, in theory, do many deployments on a single k8s cluster, there are some benefits to the automatic isolation you get from deploying on a standalone VM.

I'm doing many deployments in my single k8s cluster. I just put them each in a different namespace. The only piece that's maybe a little dicey is the single load balancer/gateway. If there's a hiccup in that, then everything goes down. But I've only blown up my cluster once in like 8 years or something, that's not too bad. It was a learning experience :-) What other kinds of isolation do you want? I can see maybe a s…

How many teams do you have using that cluster?

How large is your operations team?

What you’re saying makes it sound like you’re a one-person operation, or somewhere close to that scale. That obviously doesn’t have same requirements as much larger organizations.

I ran a job last night which provisioned a cluster with 4TB of RAM and nearly 1000 vCPUs. It ran for 20 minutes, ingested about 800 GB of data from nearly an million files, and was then deleted. To do that on a single cluster that’s also used for serving production requests would be unnecessarily complex and risky. Our production system has users in every timezone using the system 24x7. At the very least you’d have to provision separate node pools anyway, but why would you bother to do that?

Re: K3sup – bootstrap K3s over SSH in < 60s

#55

I use official ‘ansible-playbook k3s.orchestration.site -i inventory.yml’ and it installs k3s over SSH and adds it into my kubectl context, all under 60s too.

Why not just curl to bash with the official instructions?

Yes you can, but usually:

1) installing a k3s is just one of the things you want to do with a fresh server, so you can have all of the things bundled as a ansible playbook and k3s will just be a step in it.

2) often you want your infra as a code and be reproducible

Post reply on HN