We use analytics cookies.We use cookies to analyze site traffic and improve your experience.
Loading...
System Design Masterclass · Kubernetes Containers
Free preview: the first part of this 16-part lesson.
Already bought the course? Sign in to read the whole lesson.
this lesson is part of
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design courseread the rest of this lesson in
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design coursein Kubernetes Containers
This lesson is part of the full System Design Masterclass. Unlock it along with 769 other lessons for a one-time payment.
One-time payment by card or PayPal
Get Lifetime AccessOne-time payment: UPI, card or netbanking
Get Lifetime Access18 Foundation lessons are free, no payment needed. Try them now
It is easy and good
“It is really nice and good Please join the course”
Think about the thermostat on the wall of a house in winter. You turn the dial to 21 degrees and walk away. That is the whole conversation you have with it.
Now watch what the little box does after you leave. Every so often, it reads the temperature of the room. Say the room is at 18 degrees. It compares 18 with the 21 you asked for. The room is too cold, so it switches the heater on. A while later it reads the room again. Now it is 21.6. That is warm enough, so it switches the heater off. Then it waits, reads again, compares again, and nudges again. It never stops.
Here is the part I want you to notice. The thermostat does not keep a diary. It does not think, "I turned the heater on at 7:02, so the room must be warm by now." It does not care why the room is cold. Maybe someone opened a window. Maybe the night got colder. Maybe the power went off for a minute and the thermostat restarted. In every one of those cases it does exactly the same thing: it looks at the room as it is right now, compares it with the number you set, and acts on the difference.

The thermostat does three small things in a circle and then starts again. It never asks what happened before; the only input it uses is the room as it is at this moment.
That simple habit makes the thermostat very hard to confuse. If you open a window for ten minutes, the room gets colder, the thermostat notices on its next look, and the heater runs longer. Nobody has to tell the thermostat that a window was opened. Close the window and the room warms up again, the thermostat notices that too, and the heater goes quiet.
A toilet tank works the same way, with no electronics at all. A float sits on the water. When you flush, the water drops, the float drops with it, and that opens a valve. Water flows in until the float rises high enough to close the valve again. The float does not count flushes. It only "looks at" the water level, all the time.

This curve comes from a small model in the figure script, not from a real room, but the shape is the point: the loop has no special code for windows, and it still brings the room back to the setting.
In this lesson I take that small, stubborn habit and show you that it is the most important idea inside . I show you where the "number on the dial" lives, what does the looking, and what does the switching on and off. Then you run a real Kubernetes cluster on a laptop, delete things without warning, and time how fast it puts them back. At the end I show you the trap that the thermostat avoids by never keeping a diary, with a tiny program that falls into it and a second program that does not.
In Kubernetes this habit has a name. It is called a reconciliation loop, or reconcile loop: a loop that keeps comparing the state you asked for with the state that really exists, and acts on the difference. The next slide matches each part of that sentence to the thermostat.