The control plane decides. Nodes do the work.
What runs on a node
A node is a computer, real or virtual, that runs Pods. Three programs make it a node:
| Program | Job |
|---|---|
| kubelet | Asks the API server which Pods belong here, pulls their images, starts their containers, reports their status |
| container runtime | Starts and stops the containers (containerd here) |
| kube-proxy | Sets up the node's network rules (Chapter 4) |
API serverPod assigned to node
watch
kubeletpull image, start container
statusreports
API serverRunning, RESTARTS
Everything in the STATUS and RESTARTS columns of Chapter 1 was reported by a kubelet.
Look at a node
text
learner@shallows:~$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
shallows-node-1 Ready control-plane,master 12d v1.31.2+k3s1Ready means the kubelet is reporting. NotReady means it stopped, and Pods on that node are in trouble. VERSION is the kubelet's version.
describe node is long. These parts matter:
| Section | Tells you |
|---|---|
Conditions | Ready, MemoryPressure, DiskPressure: the node's health |
Capacity / Allocatable | CPU, memory and the number of Pods the node has, and the part Pods may use |
System Info | OS, kernel, container runtime, kubelet version |
Non-terminated Pods | Every Pod running on the node, with the CPU and memory it asked for |
Nodes have no namespace
A node is cluster-scoped: it is not in any namespace, like namespaces themselves. kubectl get nodes needs no -n. You can still label a node, exactly like a Pod:
text
learner@shallows:~$ kubectl label node shallows-node-1 disk=ssd
node/shallows-node-1 labeledChapter 9 uses node labels to decide where Pods go.