Worker node
- Docker & Kubernetes course
- Intermediate
- Lesson 5/82
- 4 min
Learn kubelet and kube-proxy on worker nodes.
The worker node
Three components run on each worker node:
- kubelet: takes the pods assigned to it from the API server and starts them with the container runtime; reports the pods' status back.
- Container runtime: actually runs the containers (containerd, CRI-O).
- kube-proxy: manages the network rules that route traffic arriving at Service addresses to the right pods.
$ kubectl describe node worker-1 | grep -A3 "System Info"
Container Runtime Version: containerd://1.7.22
Kubelet Version: v1.31.2Node capacity
Each node has CPU and memory capacity; the scheduler places pods according to this capacity. kubectl describe node shows the allocatable resources and the total requests of the pods on the node; if metrics-server is installed, kubectl top gives the current usage:
$ kubectl top nodes
NAME CPU(cores) CPU(%) MEMORY(bytes) MEMORY(%)
worker-1 312m 15% 1842Mi 47%
worker-2 188m 9% 1203Mi 31%Practice Inspect a node
Write two commands: show the details of the worker-1 node; then show the current CPU and memory usage of all nodes.
Starter code
# buraya yazSample solution
kubectl describe node worker-1
kubectl top nodesExpected output
Name: worker-1 Roles: <none> Allocatable: cpu: 2 memory: 3912Mi NAME CPU(cores) CPU(%) MEMORY(bytes) MEMORY(%) worker-1 312m 15% 1842Mi 47%
Questions and answers
Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.
1 Does Kubernetes need Docker to run containers?
- Only on Windows nodes
- No; a CRI-compatible runtime (e.g. containerd) is enough Correct answer
- Yes, always
- Only on the control plane
Explanation: Images built with Docker follow the OCI standard and run with containerd.
2 Show the nodes' current resource usage.
kubectl ____ nodes
kubectl top nodes
Explanation: kubectl top reads metrics-server data.
3 Match.
| Term | Meaning |
|---|---|
kubelet |
The agent on the node |
containerd |
Container runtime |
kube-proxy |
Service routing |
312m |
0.312 CPU cores |