Exploring the Kubernetes API with Curl
blog.tilt.dev
blog.tilt.dev
However, behind this simple and intuitive API there is still a massively complex and mostly unintuitive system which cannot be reduced to "just make some curl calls and you are good to go". While it is easy to do things in Kubernetes, figuring out what to do and why to do it is anything but.
I wish i could start with the concepts of distributed systems, play around in something meant for learning and then map that knowledge to the kubernetes world.
But nothing i could find was even remotely helpful. Most content around this originates in research or academia making it harder to apply and learn on real problems -- the way I'm used to learning.
Having the ingress controller already preconfigured meant it was much easier to get up and running with a deployment and service.
Every object has a kind, metadata, and spec.
If that doesn't lead to some intuition on how to use it...
This car has tires, you create, delete and patch them. It also has an axels, gas tank, etc.
This truck has tires, axels, has tank
This motorcycle has tires, axels, etc
sounds like kubernetes?
And that's a good thing! You can't expect such a complex use case to be resolved by something simple.
Having such an easy, consistent and coherent API to abstract away all that complexity is truly a godsend.
K8S on single node cluster, or hundreds of nodes, it just work the same. Moving from one company to another, you don't have to relearn everything. What works on your local kind cluster will most likely work on GKE.
What other system do that? And would that system be "simple"?
My problem is that in today's "devops" world developers are more and more just expected to be familiar with Kubernetes as another tool in their belt. Speaking from experience at my own workspace, that is a recipe for disaster.
As long as the learning curve (which could be weeks or even months) is acknowledged and factored in, Kubernetes can be a very powerful weapon to wield.
At my previous job, the developers were only expected to provide a Docker image with a list of requirements to run it (volumes, environment, configuration). Then it was my job to write the Helm chart and CI/CD pipeline. It was also my job to teach the developers to be autonomous on that aspect.
I never got a job where developers were expected to know how to deal with (pre)production servers. Except maybe in startups where everyone is expected to do everything because you never got enough people with the right skill.
I even got a developer in my team who didn't even know that Kubernetes existed while the company was migrating from on-premise to Kubernetes (and probably still does not).
The author show the structure of every endpoint:
/api/[version]/namespaces/[namespace]/[resource]/[name]
How is that simple?With such criteria even a passenger jet is simple.
If passenger jets had a comparable API you could use to ramp up to the level of competence that you can on k8s, that would be pretty amazing.
In fact, one can generate a complete API client by pointing a script to a running kubernetes instance, which will generate all code for interacting with exactly that version. And the resulting client is huuuge.
(That generation thingy is for some .net clients)
Deployments, Pods, CronJobs, Services, Secrets... Every type of resource.
Ignoring the version, that's just three nouns you need to know and you're good to go. Pretty damned simple.
Single node proxmox VM/LXC mix homeserver. Is learning K8S worthwhile?
I can see it helping me on cloud tech (inherently multi node) yet seems like a net negative at home.
It's one of those "it's popular & I could learn that, but what is the personal payoff for me here?"
Unless you can use the knowledge for work or just want something you can spend endless hours tweaking/tinkering on, not at all, not even a little bit. It will be less robust and an order of magnitude more difficult to troubleshoot and keep updated.
I work on k8s all day long. I welcome some actual responses contrary to my opinion. If he isn’t doing it for knowledge, k8s on a single node is a significant downgrade from proxmox for a home lab.
He currently has containers, vms, robust storage, and an extremely easy to use GUI out of the box with proxmox. He gets none of that from k8s without significantly more effort.
I'm no fan of Helm though, templating structured files just feels wrong. It clashes a lot with the built-in "valueFrom:" stuff built into Kubernetes; why couldn't Helm use similar "helmVar:" and keep being YAML?
I think of k8s as being two distinct things. One, it's a way to run and manage software.
Two, it's a way to consume software. There are lots of packages out there for k8s (helm charts, pre-made manifests) and so on. If you want to run eg HA gitlab, the "supported" way to do that is on k8s. There are quite a few complex software stacks now where the simplest practical way to set them up is run them in k8s.
Most of the time these big beasty things are not what you want to run for home use.
Everything you do locally can be transferred to your k8s as a service provider to deploy.
Maybe, although if you're fully happy with your current setup then probably not unless you just want to explore and learn new things.
I use kubernetes "at home" (ok, well it's an OVH server, but I use it for personal/home stuff), and I like it. I happen to run a wide variety of apps for myself and friends, already used docker, and I was somewhat reaching the limits of docker compose.
I really like the consistent ecosystem, and that k8s cleanly deals with problems like TLS termination with LE[1] and automatically updating my DNS[2]. I like that I can just write down what I want in a YAML file and don't have to mess around with docker commands or package managers or what else.
It's not for everyone, but I wouldn't say there's no value in it, especially if you're already using containers or a similar tool.
Welcome to the Turing Tarpit, where everything is possible, but nothing of interest is easy.