Member-only story
Kubernetes: It’s a Bunch of Loops
Apparently it’s that simple?
If you need a Kubernetes refresher, the docs will probably do it more justice than I will, but I want to focus on a core concept, which is the idea of these “loops” that run, and how the things that power these loops work.
When you create/change any resource in Kubernetes, you take two pretty important steps
- You store some data in etcd, Kubernetes’ main storage mechanism
- You kick one or more control loops into action, based on that new data, which try to bring the
Etcd
Etcd is a key-value store, and one that’s not purely tied to Kubernetes. But it provides a lot of features that make it a great storage mechanism for a non-centralized system like Kubernetes (i.e. constitency and high availability).
The important thing about etcd for our “bunch of loops” concept is that the loops have to act on something, and essentially the something is a desired state.
Desired state can be thought of as a person saying to you “I’d really like it if you’d take out the trash.” If you just stand there and stare back, the desired and actual state will probably never converge. But if you begrudgingly tie up the trash and take it out (come on it’s not that hard), then you’ve made the desired state…