Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Module 12 · From Scratch · Kubernetes · with code: Go · about 22 min to read

Play it as a journeyTutor comes with a plan

Kubernetes 02: The Reconcile Loop

The Reconcile Loop
The Reconcile Loop · Open board

The loop that makes the last board’s declared fact keep being true. Follows Kubernetes 01: Imperative to Declarative, which said what a Kubernetes object is. This is the machine that enforces it, and it belongs to the build in Build Your Own Kubernetes, From Scratch.

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. So far our build can do one thing. It lets you write down what you want, say three copies of a program, as a plain file. Kubernetes calls one running copy a pod. Nothing yet checks that file against what is actually running. This lesson builds the part that closes that gap.

Lesson 87 of 117 in From Scratch

The rest of this lesson is part of a plan.

A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.

See plansAlready a member? Sign in

Or start free: a free account opens lessons 2 and 3 of every track.

In this lesson

  • 1868: the engine that would not hold still
  • The fix: a controller, four lines that never stop
  • The thermostat already does this
  • Edge or level: two ways to notice a change
  • The bug that ate a real controller
  • Idempotent: running it twice for free
  • When the loop itself won’t settle

Terms it explains: pod, controller, reconcile, level-triggered, edge-triggered, idempotent, . A, resync, label selector, owner reference, informer cache, deterministic name, hot loop, in the event itself, in the world, coalescing, backoff, second, adopts.

Related paper

Review From Scratch