Kubernetes

What orchestration problems exist, which abstractions answer them, and how to decide whether you need any of it — taught as one implementation, not as what production means.

Do You Need Kubernetes?

Kubernetes is a distributed workload orchestration platform. The first question is not how to use it but whether the orchestration problem it solves is one you actually have.

Q · Before learning any of it — is orchestration complexity justified for this system?
The Problems Kubernetes Answers

Five operational problems appear the moment you have many containers on many machines. Every Kubernetes object is an answer to one of them, and is only worth learning as such.

Q · What problems appear once you have many containers on many machines, and which object answers each?
Cluster, Control Plane, Nodes, Pods

One model to debug against: a cluster is a control plane holding desired state and nodes running the workloads, with controllers continuously closing the gap between them.

Q · What are the moving parts, and which one do I look at when something is wrong?
Pods: The Unit That Gets Scheduled

A pod is one or more containers that share a network namespace, a lifecycle and a set of volumes — and it is the smallest thing the scheduler can place.

Q · Why is the unit of scheduling a pod rather than a container, and what does that grouping actually share?
Deployments: Declaring What Should Be Running

A Deployment is desired state — this many replicas of this image, with this rollout policy — that a controller works toward continuously, including after failures nobody scripted.

Q · How do I say "this version, this many, replaced safely" and have it stay true?
ReplicaSets: The Layer You Should Not Manage

A ReplicaSet keeps N pods matching a template alive. It exists so that a Deployment can roll out by scaling two of them in opposite directions — and that is the only reason you should ever look at one.

Q · What is this extra object between my Deployment and my pods, and when does it matter?
Services: A Stable Address Over Moving Pods

Pod IPs change every time a pod is replaced. A Service is a name and address that keeps meaning "the currently ready pods for this workload", updated continuously as that set changes.

Q · How does a caller reach a workload whose instances are replaced on every deploy, restart and node failure?
Getting Traffic Into the Cluster

Internal Services are unreachable from outside. Something at the edge must terminate TLS, match hostnames and paths, and route to the right Service — and which object expresses that is currently in transition.

Q · How does a request from the internet reach the right workload, and who owns the rules that decide?