Перейти к содержимому

Stop Blaming Kubernetes Until You Understand This

The Blue Kernel

0:00 / 0:00

Stop Blaming Kubernetes Until You Understand This

14 просмотров · 8 дней назад
The Blue Kernel
14 просмотров · 8 дней назад
Ask Kubernetes for three copies of an app with kubectl apply, and it answers "created". Yet at that moment, not a single copy is running, and kubectl never even talks to the machines that will run them. Seconds later, all three are running, and nobody told them to start. So who did the work? Let's open up a real cluster and watch it happen. What you'll learn: • The one idea Kubernetes rests on: you declare what you want, and control loops keep making it true • The control plane, piece by piece: the API server and its guard, etcd, the scheduler and the controller manager • Why the API server is the only door in, and why the Kubernetes logo has seven sides • What runs on every node: the kubelet, the container runtime, kube-proxy and the CNI plugin • How pods get their IPs, and how Services and CoreDNS give them one stable name and address • Hub and spoke: why components watch the API server instead of calling each other • One kubectl apply, followed through every component until the pods are running • Where the control plane lives: kind on a laptop, static pods, and managed EKS, GKE and AKS • What breaks when the scheduler, the API server or a whole node goes down • Why etcd runs three or five members, and what happens when it loses quorum Chapters: 0:00 Who did the work after kubectl apply? 1:46 Desired state: say what, not how 2:37 Control loops, like a thermostat 3:38 The API server: the only door, and its guard 5:35 etcd, the cluster's memory 6:34 The scheduler and the controller manager 7:43 The kubelet, an agent on every node 8:51 Pod IPs, Services, kube-proxy and CoreDNS 9:56 Hub and spoke: watching, not polling 10:56 One kubectl apply, step by step 12:29 Who scheduled the scheduler? Static pods 13:55 Managed control planes: EKS, GKE and AKS 14:40 Breaking the scheduler, the API server and a node 15:58 etcd quorum: why three or five 17:12 Recap Further reading, if you want to go deeper: • Borg, Omega, and Kubernetes, by Brendan Burns, Brian Grant, David Oppenheimer, Eric Brewer and John Wilkes (ACM Queue, 2016): https://doi.org/10.1145/2898442.2898444 • The History of Kubernetes & the Community Behind It, by Brendan Burns (Kubernetes blog, July 2018): https://k8s.io/blog/2018/07/20/the-history... • How Kubernetes came to be: A co-founder shares the story, by Craig McLuckie (Google Cloud blog, July 2016), the story of Project Seven of Nine: https://cloud.google.com/blog/products/con... • The Kubernetes docs on the cluster's components: https://k8s.io/docs/concepts/overview/comp... • The etcd docs, and their FAQ on why a cluster has an odd number of members: https://etcd.io/docs/latest/faq/ • kind, for running a cluster like the one in this video on your own laptop: https://kind.sigs.k8s.io New here? Subscribe to The Blue Kernel for more deep dives like this one. Up next: The pod, part 1.