9.1. Kubernetes: The Operating System for Distributed Systems
Everything in Kubernetes is a control loop: a controller watches the desired state in etcd, compares it to reality, and acts to close the gap. Understanding the core objects means understanding what each controller reconciles — a Deployment toward a replica count, a StatefulSet toward stable identities, the scheduler toward feasible placements. This chapter covers those workload objects, the scheduler’s placement mechanics, etcd as the cluster’s source of truth, autoscaling, and the Operator pattern that extends the reconciliation model to your own domain.
Topics Covered
Section titled “Topics Covered”- 9.1.1. Pod, Deployment, StatefulSet, DaemonSet: When to Use Which: Compares Pod, Deployment, StatefulSet, and DaemonSet and which workload each is designed to run.
- 9.1.2. The Kubernetes Scheduler: The Mechanics of Placement Decisions: Explains the scheduler’s filter and score plugins, preemption, and how placement decisions are actually made.
- 9.1.3. etcd: The Heart of Cluster State: Covers etcd as the source of cluster state, its watch mechanics, size limits, and practical ceiling.
- 9.1.4. Horizontal Pod Autoscaler (HPA) and KEDA: Event-Driven Scaling: Explains pod-level autoscaling with HPA and event-driven scaling with KEDA.
- 9.1.5. Node Affinity, Taints and Tolerations: Fine-Grained Placement: Covers node affinity, taints, and tolerations for fine-grained control over where pods land.
- 9.1.6. The Operator Pattern: Extending Kubernetes: Explains the Operator pattern that extends the reconciliation model to manage custom application domains.