News for hackers. Stuff that matters.
Re:My IRC client runs on Kubernetes by erulabs on Friday August 23, 2024 @04:49PM (#41332979)
Well I think it's neat. The bit I find most provoking is the "if you already have Kubernetes..." premise. I find myself having a hard time not wanting to shove everything into the Kubernetes framework simply to avoid having to document what solutions I've chosen. `kubectl get all` gives me an overview of a project in a way that is impossible if every single project uses a different or bespoke management system.

"simple/complex" is not the right paradigm. The real SRE controversy is "unique/standard". Yes, the standard approach is more complex. But it is better _in practice_ to have a single approach, rather than many individually-simpler, but in-aggregate-more-complex approaches.

Kubernetes is never the perfect solution to an engineering problem, but it is almost always the most pragmatic solution to a business problem for a business with many such problems.

Re:My IRC client runs on Kubernetes by akdor1154 on Friday August 23, 2024 @06:50PM (#41333759)
Yeah k8s is great. It gives you an infinite rope generator to let you hang yourself with ever increasing complexity, but with a bit of restraint you can orchestrate pretty much anything in a simple or at least standard way.

I'd take a stack of yaml over a stack of bespoke aws managed service scripts any day.

Re:My IRC client runs on Kubernetes by nopurpose on Friday August 23, 2024 @08:10PM (#41334307)
Speaking of rope. Right this moment GKE clusters can't provision large volumes (~4TiB) because their CSI driver receive OOMKill when formatting volume. Problem was reported back in Apr and still not fixed.
Re:My IRC client runs on Kubernetes by cqqxo4zV46cp on Friday August 23, 2024 @07:33PM (#41334050)
Not a day goes by where there isn’t some greybeard having a huge sulk about how nobody wants to use his collection of esoteric bash scripts that nobody else will ever understand, but HE does.
Re:My IRC client runs on Kubernetes by jauntywundrkind on Friday August 23, 2024 @10:26PM (#41335045)
Erulabs top comment nailed it so hard. There's been such a vocal force in comments for so long, of revulsion to "complexity", believing "simpler" is better.

> Yes, the standard approach is more complex. But it is better _in practice_ to have a single approach, rather than many individually-simpler, but in-aggregate-more-complex approaches.

There still remains such a strong reflexive "you don't need Kubernetes for that" response that shows up.

But we really are seeing a lot more people who get the value of there being a standard way of doing things, of having common platform & expectations underneath. The cost of starting up may be significant, but it results in a more legible understandable result, and we can keep reusing that base of capabilities again and again and again.

Its such an exciting change. Open source has been around for a long time, but running software has been the wild West, until very very recently. We now have this awesome, scalable, extensible way to manage containers, volumes, load balancers, databases, and whatever else have we.

Love to see it. Folks aren't wrong about it having complexity, but so much of the complexity already existed, was just not clearly visible or well harnesses (different example is like how systemd makes it so easy to restrict services, give them temporary/unprivileged users). We are closer to a real shared understanding, to having so many particular decisions offloaded & so much more we can work together atop. Love it so much.

Re:My IRC client runs on Kubernetes by quectophoton on Friday August 23, 2024 @11:46PM (#41335423)
> There still remains such a strong reflexive "you don't need Kubernetes for that" response that shows up.

If you're already using docker-compose, the jump from there to Docker Swarm is arguably tiny in comparison to the jump from there to Kubernetes, while still bringing most of its value.

So yes, I will keep evaluating the tradeoffs every time and choose accordingly.

Re:My IRC client runs on Kubernetes by skydhash on Saturday August 24, 2024 @02:30AM (#41336112)
Complex solutions exists for complex needs. If you just need to crop an image, you don’t install Photoshop to do so. If you only have a simple web app for a few thousands users, you don’t go and setup k8s. Yes, having photoshop means you may do what all the cool kids are doing, but if you’re only cropping image, Preview.app is good enough. Eschewing simpler solutions because “standard” is how you start to see everything as a nail for your hammer.

There’s another thing that no one who advocates for these systems wants to mention: The cost of maintenance. I’m ok with systemd as 98% is outsourced to the maintainers. But I’d be more comfortable if k8s was a more monolithic system a la BSD. At least linux have distros.

Re:My IRC client runs on Kubernetes by Yasuraka on Saturday August 24, 2024 @03:13AM (#41336254)
K8s has distros, most of them certified to be compatible, and some of them are monolithic(-ish (single binary)), such as k3s/rke2.
Re:My IRC client runs on Kubernetes by fesc on Saturday August 24, 2024 @02:32PM (#41340323)
> for a few thousands users

It makes absolutely no sense to base this decision on the number of users. We have some applications that don't even have 10 users but still use k8s.

Try to understand the point that was made in the original comment: Kubernetes is a way to actually make infrastructure simpler to understand for a team which maintains lots of different applications, as it can scale from a deployment with just one pod to hundreds of nodes and a silly microservices architecture.

The point is not that every application might need this scalability, no the point is that for a team needing to maintain lots of different applications, some internal, some for customers, some in private datacenters, some in the cloud, Kubernetes can be the single common denominator.

Hell, I'm a hardcode NixOS fan but for most services, I still prefer to run them in k8s just as it is more portable. Today I might be okay having some service sitting on some box, running via systemd. But tomorrow I might want to run this service highly available on some cluster. Using k8s that is simple, so why not do it from the start by just treating k8s as a slighly more powerful docker-compose.

Re:My IRC client runs on Kubernetes by nucleardog on Saturday August 24, 2024 @06:22PM (#41342213)
> But I’d be more comfortable if k8s was a more monolithic system a la BSD. At least linux have distros.

k3s is essentially a single binary and installed, up and running with a single command.

With a handful of command line flags you can have a full cluster up and running with some master nodes and some agents and high availability through etcd and load balancing and network policies and ingress and distributed clouds via WireGuard/Tailscale… They also have “blessed” options (that you can generally install with a single command) for things like persistent storage, etc.

I would not want to build a k8s cluster from scratch. Setting up and maintaining a k3s cluster is pretty trivial.

Re:My IRC client runs on Kubernetes by jauntywundrkind on Saturday August 24, 2024 @06:36PM (#41342315)
> Complex solutions exists for complex needs. If you just need to...

Personally, to me, this sounds like madness.

Deciding you need to custom tailor and brew up a specific solution that exactly matches each use case begets endless complexity. Constantly negotiating a position & changing approaches begets endless complexity.

And the complexity needle moves over time, such that your initial assumptions often don't stand. Getting something running usually isn't too hard. But creeping demands of observability, monitoring, rotating certs, backups, and other concerns are going to start getting tacked on. If you only ever do one thing, and there aren't many of ya'll & never will be, and very few newcomers will ever join, maybe maybe maybe you find a win today by doing less, by hand picking your options & getting in there & cobbling your stack of tools together. Convincing yourself to start small, to avoid "complex" Kubernetes to do less, is in most cases though going to backfire even for a single piece of software, as situations evolve.

There is such a fear that Kubernetes is complex, but it just feels like so many are missing the point, are resisting the standards & practices that erulabs' spoke to.

But man, it is so not complex to prop up a big k3s node & push some containers at it. And anyone whose spent more than 1 hours with kube will be able to look around, see what's running on the node, see how everything works; you won't have to explain what you did, it'll be obvious. And they'll be able to keep going. And you'll be able to keep encorporating concerns & platform & new apps in. And those skills - mastering that complexity - will transfer to every other thing you want to do, will scale way up and way down.

(I do think systemd offers a good number of similar advantages of replicatability, consistency, paved-roadness, and is pretty solid an option, but involves more finding-your-practice than kube)

Re:My IRC client runs on Kubernetes by imtringued on Saturday August 24, 2024 @05:08AM (#41336732)
To be fair, the problem isn't the greybeard. It is that nobody understands bash.
Re:My IRC client runs on Kubernetes by trabant00 on Saturday August 24, 2024 @05:45AM (#41336907)
Look up how much bash is in the k8s codebase. :)
Re:My IRC client runs on Kubernetes by ownagefool on Saturday August 24, 2024 @05:12AM (#41336751)
This is a great response and pretty much sums it up.

With k8s you can easily install a bunch of helm charts and get a bespoke platform that becomes a full time role for multiple people.

There are pros and cons against this approach but you if you're worried k8s is complex, just use the cloud native integrations.

Re:My IRC client runs on Kubernetes by paulddraper on Friday August 23, 2024 @07:59PM (#41334244)
The bit I find the most provoking is calling k8 "standard."

And not a collection of strung-together controllers.

Re:My IRC client runs on Kubernetes by Spivak on Friday August 23, 2024 @05:22PM (#41333221)
Is the mountain of k8s code on top of your cloud of choice not strictly more complex than the cloud services it's orchestrating? Like I think k8s is good software but to hear that you're not choosing it because it's good engineering is surprising. To me that's the only reason you choose it, because you want or need the control-loop based infrastructure management that you can't get on say AWS alone.
Re:My IRC client runs on Kubernetes by zipmapfoldright on Friday August 23, 2024 @06:51PM (#41333771)
That's the same with.. the Linux kernel? I'd wager that most services people write have less complexity than the the kernel it runs on. We choose to do that not because we need its full feature set, but because it gives us useful abstractions.
Re:My IRC client runs on Kubernetes by cjk on Friday August 23, 2024 @07:18PM (#41333952)
I don’t know that that’s the right analogy. End users don’t have to write a mountain of configuration in order to effectively use the Linux kernel.

If k8s were as complex as it was, but didn’t force that complexity onto the user, I’d agree.

Re:My IRC client runs on Kubernetes by cortesoft on Friday August 23, 2024 @09:24PM (#41334752)
You can deploy quite a bit to k8s with just a few lines of helm installs, and it will work with very little configuration.
Re:My IRC client runs on Kubernetes by Spivak on Saturday August 24, 2024 @01:52AM (#41335964)
Exactly, I think I could have stated it better. Using k8s is strictly more complex from the perspective of the operator, and the mountain I'm referring to isn't actually from k8s itself but from all the 3rd party stuff you have to layer on to actually make it useful-- things like cluster-autoscaler, vpa, kube-prometheus, aws-load-balancer-controller, misc. operators, that fall on my side of the wall when it comes to fixing it when it's broken.

I can understand that it doesn't come off that way but I actually like k8s and the surrounding ecosystem. But deploying k8s makes your infrastructure as complicated as k8s itself, which can be a massive win because it works in both directions.

Re:My IRC client runs on Kubernetes by skydhash on Saturday August 24, 2024 @02:35AM (#41336132)
If it can’t be monolithic like *BSD, at least offer distributions like the Linux Sphere. Like a ready to go LAMP stack. Or a collection of services (Database, Storage, Logs,…)
Re:My IRC client runs on Kubernetes by p_l on Saturday August 24, 2024 @06:59AM (#41337223)
There are distributions of k8s for years now. Starting from simple side like k3s, through more complex (k0s, rancher, etc), to complete OS images (Talos, Metropolis)
Re:My IRC client runs on Kubernetes by freeone3000 on Saturday August 24, 2024 @07:41AM (#41337422)
I’m running Talos locally and run into basically none of these issues — use one of the provided storage providers, dump a container into it, bing bang boom you’re done.
Re:My IRC client runs on Kubernetes by Yasuraka on Saturday August 24, 2024 @03:52AM (#41336424)
And similarly, you don't need any configuration at all to just run k8s itself, you do need to configure your application and pay attention when exposing things, but the same holds true for an OS on a single machine.

I believe the OS comparison is the most apt, both in the sense of the layer it represents, i.e. abstracting away physical machines and managing resources for applications, but also from what it means: one used to have to rewrite a program for each new computer as they were all unique (incl. CPU), just like each corp had its own way of managing infrastructure, clusters of nodes and automation.

Any new application needed to be integrated from the ground up, which might be simpler in that you only touch what you actually need, but you also have to do it every single time, and it's different for each project/corp - with the vast majority missing out on the more complex bits that don't fit into an nginx config and some shell scripts.

Re:My IRC client runs on Kubernetes by marcinzm on Friday August 23, 2024 @05:27PM (#41333265)
There’s always a mountain of code on top of the cloud provider.
Re:My IRC client runs on Kubernetes by andrewstuart2 on Friday August 23, 2024 @05:34PM (#41333319)
Furthermore, there's always a mountain of code aggregating heterogeneous systems into a uniform interface. Look at the linux kernel, or LLVM, or pretty much any other (successful) project that provides abstractions to many different backends.
Re:My IRC client runs on Kubernetes by Spivak on Friday August 23, 2024 @05:43PM (#41333372)
Yes but that code isn't typically running in production the way k8s is. Having a lot of terraform is just a fancy method of statically provisioning infrastructure. The code is gone once it applies. Bringing k8s into the mix is a whole other application layer that's providing services to your code. Things like sgs for pods, cni plugins, coredns, is code that wouldn't be there in a non k8s world.

Your problems now include k8s networking as well as VPC networking.

Re:My IRC client runs on Kubernetes by marcinzm on Friday August 23, 2024 @09:18PM (#41334720)
> The code is gone once it applies

Until you need to update a change or upgrade something or patch a security issue. The most dangerous code is code that doesn't run often. Like backup restores. Ticking time bombs unless you're really careful.

> Bringing k8s into the mix is a whole other application layer that's providing services to your code. Things like sgs for pods, cni plugins, coredns, is code that wouldn't be there in a non k8s world.

The same applies to everything running around your tech stack that you didn't write. That includes the language runtime, the compiler, the operating system, all OS libraries you use, and the libraries your app imports. The ship has sailed and K8S isn't much of an addition.

I haven't hit a CNI bug in probably 5 years and that was only on Amazon's horrible CNI code. I've hit a ton of bugs in my software stack. And the libraries I depend on. And my deployment stack. And my cross-service networking stack at the application layer.

Re:My IRC client runs on Kubernetes by politelemon on Saturday August 24, 2024 @03:53AM (#41336426)
> But it is better _in practice_ to have a single approach, rather than many individually-simpler, but in-aggregate-more-complex approaches.

Very much depends on the point of view. It's great from an SRE point of view but not necessarily application/developers, who are being constrained to a platform's idiosyncracies and expressions of platform egos.

The individually simpler solutions are only complex from a high level, ivory tower, or middle management perspective, not from the perspective of people who have to use and manage the application itself.

Re:My IRC client runs on Kubernetes by ownagefool on Saturday August 24, 2024 @04:30AM (#41336578)
I think just running a process and exposing a port is fine, but the second you get into running a bunch of services together, or caring about environments, the k8s abstraction is simpler.

In the last 6 months my job has been to get production ready vault instances on azure. There's a bunch of complex, unreliable and not very fun APIs here.

Much like AWS, there isn't really a StatefulSet ( PetSet ) abstraction. To you need to write a bunch of bespoke logic where you figure which IP addresses, names, IDs, and Disks you need to attach to a new VM.

Whilst iterating, the azure APIs are eventually consistent that cause all sort of niggly problems. Resources that are created don't get added to TF when there's a failure.

I create a new vault on a PR and it takes 20 minutes to deploy.

The problem took a couple of months and I created a bunch of code.

On k8s I can just deploy the helm chart in 2 minutes. The abstractions are cleaner, it's more reliable, and way more fun.

At the end of the azure project, the team agreed to do a AKS poc, where we gave the task to the junior of the team, and the entire thing was done in a week.

If you're not doing this type of work, maybe you don't need k8s. But if you're not doing ephemeral test environments, do you actually not see them as a positive, or is it an effort thing? Because it takes me no real effort.

Re:My IRC client runs on Kubernetes by thesnide on Saturday August 24, 2024 @03:58AM (#41336454)
If you only have a hammer, everything looks like a nail.

Then, it mostly works, so management makes "economy of scales" and removes all screw drivers, since they need more skills anyway.

Now, you are only using nails.

Until someone else rediscovers screws and starts another hype cycle.

Re:My IRC client runs on Kubernetes by TeMPOraL on Saturday August 24, 2024 @06:18AM (#41337050)
Except in manufacturing, this actually works. Economies of scale are real and trump pretty much every other consideration, and they're what enable pretty much everything we have around us that isn't biological.