The last stage before the capstone. It picks up right where the kubelet (Kubernetes 06: The Kubelet) left off: programs are alive and running somewhere in the fleet, and this stage is how anything outside ever finds one of them.
Before you start. This series builds a small copy of Kubernetes, a program that watches over a fleet of machines and keeps every program you asked for running on them, restarting anything that dies (Build Your Own Kubernetes, From Scratch). Kubernetes calls one running copy of a program a pod: usually one container, a program bundled up to run the same way anywhere. One machine in the fleet is a node, and the whole fleet together is a cluster. So far our build can do four things. You write down what you want running in a plain text file, and a shared store keeps it. Small loops called controllers watch that store and nudge reality to match it. A scheduler picks which machine, or node, runs each pod. On that node a helper called the kubelet starts the pod and restarts it if it dies. Every pod also gets its own IP address, its number on the network, and every restart or move hands it a new one. This stage is about what to do when the number you wrote down keeps changing under you.
Lesson 92 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.
Or start free: a free account opens lessons 2 and 3 of every track.
In this lesson
2014: flannel solves how pods talk, not how you find one
Which one, right now?
The company’s one phone number
Nothing answers at that number
A name, not even a number
The endpoints loop, in code
The virtual IP is a rule, not a machine
Names, and the lookup that tries four times too many
Per connection, not per request
Why the object that holds the list had to be redesigned
Layer by layer, and where each one actually breaks
The kinds of service, briefly
Terms it explains: pod, container, node, cluster, controllers, scheduler, kubelet, [[0005-inside-your-building|IP address]], overlay network, service, virtual IP, kube-proxy, DNS, iptables, force reconnection, The pod network, The service object, The endpoints loop, kube-proxy and DNS, A plain service, name, input to the loop, empty, correct.