3 ms·
> One way to think of Kubernetes is as a distributed framework for control loops. Broadly speaking, control loops create a declarative layer on top of an impera
by orf 4y ago
> One way to think of Kubernetes is as a distributed framework for control loops. Broadly speaking, control loops create a declarative layer on top of an imperative system.
Finally: a post about Kubernetes that actually understands what it fundamentally is.
> Kubernetes abstracts away the decision of which computer a pod runs on, but reality has a way of poking through. For example, if you want multiple pods to access the same persistent storage volume, whether or not they are running on the same node suddenly becomes your concern again.
I'm not sure I agree that this itself constitutes a leaky abstraction. Kubernetes still abstracts away the decision of which computer a pod runs on, the persistent storage volume is just another declarative constraint on where a pod can be scheduled. It's no different from specifying you need "40" CPU cores, and thus only being able to be scheduled on nodes with >40 cores.
> There’s no fundamental reason that I should need anything except my compiler to produce a universally deployable unit of code.
I agree - but you can do that with 'containers'. You just create an empty "FROM scratch" container then copy your binary in. The end result is that your OCI image is just a single .tar.gz file containing your binary alongside a JSON document specifying things like the entrypoint and any labels. Just like a shipping container, this plugs into anything that ships things shaped like that.
You get a bunch of nice stuff for free with this (tagged + content addressable remote storage with garbage collection! inter-image layer caching!), even if you're slinging about WASM binaries I'd still package them as OCI images.
> The use of YAML as the primary interface, which is notoriously full of foot-guns.
There's a lot more to say here, and it's more of a legitimate criticism of Kubernetes than most of the "hurr dur k8s complex" critisisms you commonly see. The ecosystem has kind of centered around Helm as a way of templating resources, but it's... horrible. It's all so horrible. A huge step up from ktml or other rubbish from the past, but go's template language isn't fun.
But I'm not sure how it could have gone any differently. JSON is as standard and simple as it gets and is simple to auto-generate, but it's not user friendly. So either the kubernetes getting started guide starts with "first go auto-generate your JSON using some tool we don't distribute", or you provide a more user-friendly way for people to onboard.
YAML is a good middle ground here between giving users the ability to auto-generate resources from other systems (i.e spitting out JSON and shovelling it into a k8s API) and something user-friendly for people to interact with and view using kubectl/k9s/whatever.
- dinosaurdynasty 4y agoI often wonder how many footguns could've been removed if projects like k8s/ansible used TOML instead of YAML.
- bvrmn 4y agoTOML is awful substitution in the ansible context. Let's play a game, how about I give you a real-life playbook and you translate it to TOML?
- SOLAR_FIELDS 4y agoNot many? I use k8s extensively and don’t see YAML vs TOML being anything that could make any sort of difference. It’s just a configuration file and it could be markdown or json or whatever and it wouldn’t make that much of a difference because it gets linted anyway. In the end you’re really just discussing the ups and downs of whatever markup language got chosen.
- soco 4y agoI'm confused, I thought JSON was created because XML wasn't user friendly. I on the other hand see no user friendliness in either YAML, JSON or XML. Just formatted text with or without tabs. Users don't like standards so whatever you choose somebody will complain.