Curious how Kubernetes seems to magically achieve your desired state? When you pass your YAML file to the Kubernetes API and stuff just happens, what is going on? Eric Shanks breaks down the basics of the control loop that Kubernetes uses to accomplish this.
Eric Shanks comments:
The mechanism that allows for Kubernetes to enforce this desired state is the control loop. The basics of this are pretty simple. A control loop can be though of in three stages.
Observe – What is the desired state of our objects?
Check Differences – What is the current state of our objects and the differences between our desired state?
Take Action – Make the current state look like the desired state.
Repeat – Repeat this over and over again.
This is just a high-level explanation, of course. For a deeper dive, read more at The IT Hollow Kubernetes – Desired State and Control Loops.