by withinboredom · 3y ago · 0 comments
I don’t have to pay someone else to handle this, but if did, I would get rid of k8s in a heartbeat. I’ve seen a devops team of only a few people manage tens of thousands of traditional servers, but I doubt such a small team could handle a k8s cluster of the same size.
I’m considering moving back to traditional architecture for my blog and other projects. K8s has been fun, but there’s too much magic everywhere.
I’ve heard it’s supposed to solve the problem of programs running differently on different machines. That’s a problem I’ve never encountered in my 12 years of experience.
But the types of issues you describe are very real and very time consuming.
It makes sense if you use docker. Docker containers need somewhere to live. If you want two copies of your service alive at all times, K8s is the thing which will listen for crashes, and restart them, etc.
I already mentioned K8s as an automatic container runner/restarter. But if you run two copies of a service, you need a load balancer to route traffic to them. You can program your own (more work), or download & run someone else's (less work). Or you can see what K8s provides [0] and do even less work than that.
If your services talk to one another, they could talk by hard-coded IP (maintenance nightmare), or by hostname. If they talk by hostname, then they need DNS to resolve those host names. Again, you can roll DNS yourself, or you can see what K8s gives you [1].
And on and on. Firewalls, https, permissions, password/secrets management.
There's one more thing to say about K8s which is that it has become a bit of a defacto standard. So you don't need to relearn a completely new way of doing this stuff if you decide to switch jobs / cloud providers.
[0] https://kubernetes.io/docs/concepts/services-networking/ingr... [1] https://kubernetes.io/docs/concepts/services-networking/dns-...
Or just apply their official helm chart… and you’re pretty much done. You’ll also get better efficiency because the various environments will all get bin-packed together.
Is it perfect? No, but it’s better than doing to yourself!
If you do not need this features k8s is not the thing to use, unless you have the skill set anyways.
Things get messy when state and persistence is involved, I’d prefer to habe my backend DB not on k8s and link the services against it.
This has been my experience with a lot of the "we need to be cloud native! containers!" mantra in the enterprise. Some exec gets it in their head it's a good idea (and probably gets non-trivial "referral agent fees") this is a must do, and all of the young, hip developer types are happy to cheerlead it.
Two years later OpEx is exploding, most of the processes haven't yet been converted to be in the cloud, and the environment isn't noticeably better or different. It sucks, just sucks in a new and more expensive way that gives you less control of your data.
Seen this at 3 x F500 orgs and with multiple cloud providers, including the big 3 + one of the well known second tiers.
Works well with terraform and extending with nomad clients it's a breeze.
I set my personal bare metals with nomad infra and never looked back.
Honestly I didn't got into the position where this to become critical and always managed to stay ahead.
So far(2yrs) so good. I am mostly one man show and I found k8s a bit too much, there is always something.
Maybe I was doing smth wrong or didn't knew how to plan better, idk :)
Edit//typos
I can definitely see the appeal of tinkering with 'advance tech' for personal hobby tho. Because now I am pretty sure you know more about K8 than me :)
> I spend at least one night a week babysitting the cluster
...
> K8s has been fun
This is why everything sucks now.
To each his own, I guess.