Kubernetes 04: Objects and Controllers

One reconcile loop becomes a tree of them, each one small, watching only the layer just below it.
Before you start. This series builds a small copy of Kubernetes: a program that keeps a fleet of machines running the programs you asked for, and restarts them when they die (Build Your Own Kubernetes - From Scratch). So far the build keeps a store that remembers every object you declare and watches it instead of asking the same question over and over (Kubernetes 03: Store and Watch), and runs a reconcile loop that compares what you asked for to what’s running and changes one thing to close the gap, without remembering what it made (Kubernetes 02: The Reconcile Loop). This lesson stacks several of those loops into a tree, and shows that two things usually taught as separate Kubernetes features are the same four lines running one level apart.