Hacker News new | ask | show | jobs
by xlii 2 days ago
One year ago I might agree that Kubernetes is an overkill but today?

Ask your favorite GPT to generate manifests, get primary app into cluster with telepresence or execute straight from container and switch contexts and clusters like it's 90s again.

One reason I dislike Docker Compose and Docker is lack of isolation. Yes sure if you put your arm deep enough you can get it, but on local k8s I can spin cluster per workspace and not worry about conflicting ports between PostgreSQL instances.

Before LLMs writing consistent YAMLs was PITA but today on low/development scale it's pretty much free lunch.

6 comments

Strong agree, if there's one thing LLMs are excellent at, it's writing Terraform and Kubernetes deployments (and/or helm charts). What used to be half a day of research, trial and error, is now 20 seconds of AI churn and 98% of the time it nails it on the first try. And then point it at grafana and tell it to write you a dashboard for the new service/s. Easy peasy lemon squeezy. What used to require a team of 4 devops/SRE to support a medium sized company, can now be collapsed down into a a single part time SRE.
LLMs are pretty bad at writing those things in my experience. They will invent HCL syntax that doesn't exist, generate absurdly overwrought Helm charts, put in assumptions that don't make any sense, and so on. It's faster, and better quality, to write the stuff myself.
Which LLMs?
as I got into SWE 4 yrs ago, this was a big part of my job as a SRE/SDET and my next job came b/c of that SRE exp which was never used, so just became an SDET.

Now am laid off, and hard to find a job...

I'm sorry to read that.

Unfortunately it's an industry wide problem, and it touches many areas and levels of expertise. Some believed that AI can drop costs and compressed job spaces.

It starts to bounce off but it's not back to - what I could fall - normal baseline.

yeah. Was always the jr on a team full of seniors/staff. Always switching context, so many verticals and systems.

True startups need only senior+ and big ones don't wanna interview often.

> Some believed that AI can drop costs

And it did! For companies, not for you.

The other 2% your entire prod deployment gets deleted.
on the other hand, it might be a benefit that an AI can't spin up instances.

Do I want potential to increase expenditure by infinite percent? Or do I want to sign a contract for 2 500$/mo dedicated servers?

Let's be real the latter can handle 20k concurrent users without breaking a sweat, and that's like 99.9% of companies and projects.

Oh what would I do with $2,500 a month in dedicated servers..? Kubernetes.
That was two $500/mo servers, not $2500/mo.
> One reason I dislike Docker Compose and Docker is lack of isolation. Yes sure if you put your arm deep enough you can get it, but on local k8s I can spin cluster per workspace and not worry about conflicting ports between PostgreSQL instances.

Using Kubernetes because you're unable to grok docker's networking enough so you can't run multiple containers using their own ports and not conflicting with other stuff sounds like a recipe for disaster, even (especially?) if you use agents for this. Particularly if you let them manage a production environment, you're bound to lose important data eventually.

> pretty much free lunch.

Aah, famous last words of the young :)

Finally just bought a piece of my own hardware and got LLM to deploy k3s cluster on it.

I think diy homelab/hosting is more accessible than ever.

Cut costs on cloud spend and invest into AI spend.

For a solo dev on a budget, I think it just makes sense.

It's not an investment, it's just a spend. If you had learnt to deploy k3s yourself, which is really easy, but still, that would be an investment. Paying for LLMs is basically renting.
This cuts both ways.

At any stage of https://www.macchaffee.com/blog/2024/you-have-built-a-kubern... a SOTA model can repackage it into Kubernetes.

If you're feeling extra spicy you don't even need the deploy scripts. Just a `llm` user account with the right permissions & ssh keys on all your servers.

> Ask your favorite GPT to generate manifests, ... > Before LLMs writing consistent YAMLs was PITA but today on low/development scale it's pretty much free lunch.

Writing manifests seems like a trivial thing to focus on. Who operates the k8s cluster in production? Who runs upgrades? Who's on call to monitor the system? Of course if someone else is doing all the work for you, it feels like free lunch!

I find it much easier to upgrade k8s than a bare naked server.

With managed k8s, your host upgrades the control plane. And then you can upgrade your PHP, Python, Node, what have you, by flipping a number in your Dockerfile.

Not like other forms of sever infra don't need monitoring and upgrades anyway.

The day Kubernetes will have an LTS version supported for 5 years with no API churn, and EKS and other k8s managed systems will have an LTS version based on the k8s LTS plus a bunch of LTS addons supported natively, then I will agree. Actually we will probably live in a better world overall.

Meanwhile, the update stress of core k8s - even managed - is much higher than a good managed old fashioned (immutable) infrastructure.

Interesting. I have just started reading about Kubernetes. Is there an reading material that goes over this process you just described?
Don't. Get a chatgpt subscription and spin up a minikube cluster and launch some stuff and play around.

K8s is incredibly deep and complex but with AI it's finally easy to just hello world it.

This is absolutely terrible advice. You should never ever use LLMs to work on something you don't understand already, because you have no way to catch the machine when it screws up (and it will screw up). Just like with every other form of automation before LLMs, a smart person only automates things he already knows how to do himself.
"Only a Sith deals in absolutes" ;-)

I mostly agree it's an area that's risky to wander into mindlessly but it is much more easier to validate knowledge than to practice it.

E.g. I can't write Chinese but can validate if piece of Chinese is a valid one (by feeding to N translators, other LLMs or asking a friend who knows Chinese).

Under assumption of "LLM output is false until proven otherwise" it's not a bad approach and worked for me in various scenarios. (E.g. I asked for implementation of algorithm in Rust and then validated it against base definition).

LLMs allow for play. Play means learning. Then that knowledge can be utilized for a second project or to chat with someone more experienced.

We all have different learning styles. I learn through play when it comes to LLMs.

Yeah no. Getting the first hello world up is more important than anything else.

Until you physically see it running learning is slow.

I learned k8s through many months of study and pain pre AI. Once I actually got it up learning was FAR easier.

This is like using a jupyter notebook to learn python and is always the first thing I point to for someone just starting to learn. Only after should you learn venv, pip install, classes ect.

100% use AI to get started on something you don't understand. I will literally never start to learn about a technical system again without first doing a hello world with AI.

If you wanted to learn how to setup your own Kuberbetes cluster I found EasyK3S https://easyk3s.dev/ to be a good place to learn the basics.

It is not perfect, but a good place to start to get a hang of how to setup your own K8S setup if you are new to Kubernetes.

Might watch to start out with docker-cónaíse firat,