Nodes, the kubelet and the container runtime
What runs on every worker: the kubelet that turns Pod objects into containers, the CRI runtime underneath, kube-proxy, and how a node proves it is alive.
Nodes, the kubelet and the container runtime
The player loads from youtube-nocookie.com when you press play. Nothing reaches YouTube before that.
Not started
What you'll learn
- A node is a machine that runs a kubelet. The kubelet registers a Node object, watches for Pods bound to it, and makes the containers match.
- The kubelet never starts containers itself. It calls a container runtime such as containerd or CRI-O over the CRI gRPC API: a Pod sandbox first, then each container.
- Docker Engine stopped being a built-in runtime when dockershim was removed in 1.24. Images built with Docker still run, because they are OCI images.
- Nodes prove they are alive by renewing a Lease in kube-node-lease every 10 seconds. With no heartbeat for 50 seconds, the node lifecycle controller marks the node Unknown and taints it.
- Running Pods keep running when the control plane is unreachable. The kubelet keeps acting on what it last knew, and static Pods from a local directory need no API server at all.
Someone has to touch the machine
The control plane writes down decisions: this Pod should run on that node. A record in etcd starts nothing. Something on each machine has to read those decisions, pull images, set up networking, start processes, restart them when they crash, and report back honestly about what is really happening. It also has to keep working when the network to the control plane drops for a minute, because a flaky link should not take down every app.
That something is a short stack of node components. A node is any machine, VM or physical, that runs them.
The kubelet: the node’s manager
The kubelet is a daemon, usually a systemd service, and it is the only Kubernetes component that has to run on every node. Its job has three parts.
- Register the node. On start it creates a Node object with the machine’s capacity (CPU, memory, how many Pods it can hold), its labels and its addresses.
- Run what is assigned. It watches the API for Pods whose
spec.nodeNameis its own name. For each, a per-Pod worker drives the containers toward the Pod spec: pull images, create them, run probes, restart failed containers with back-off, and kill them on deletion. - Report back. It writes Pod status (phase, container states, IPs) and Node status (conditions such as
Ready,MemoryPressure,DiskPressure).
Think of a site foreman on a building job. Head office decides what to build and posts the plans. The foreman reads the plans for this site, hires the crews to do the work, checks on them, and phones in progress reports. If head office is unreachable for an afternoon, the crews keep working from the plans they already have.
The kubelet also reads Pod manifests from a local directory, /etc/kubernetes/manifests on kubeadm clusters. These static Pods need no API server, which is how kubeadm runs the API server, etcd, scheduler and controller manager themselves. The kubelet posts a read-only “mirror Pod” for each so they show up in kubectl get pods -n kube-system.
The container runtime and the CRI
The kubelet does not know how to create a container. It calls a container runtime over the Container Runtime Interface (CRI), a gRPC API defined in the cri-api repository. The default endpoint in the v1.37 kubelet configuration is unix:///run/containerd/containerd.sock. The proto defines two services:
RuntimeService:RunPodSandbox,CreateContainer,StartContainer,StopContainer,ExecSyncand friends.ImageService:PullImage,ListImages,RemoveImage.
The order matters. For each Pod the kubelet first asks for a Pod sandbox: the shared network namespace and cgroup parent that all the Pod’s containers live in. containerd and CRI-O implement it with a tiny pause container that does nothing but hold the namespace open. The CNI plugin gives the sandbox its IP. Then each app container is created inside it. Because the sandbox outlives any one container, a crashing app container restarts with the same IP. The Linux namespaces and cgroups lessons cover the kernel side.
The common runtimes are containerd (the default on most distributions and managed services) and CRI-O (Red Hat’s, used by OpenShift). Both hand the actual process creation to an OCI runtime such as runc or crun, the layer the docker architecture lesson describes.
Docker Engine used to be supported through a shim inside the kubelet called dockershim. It was removed in Kubernetes 1.24. That did not break Docker-built images: they are OCI images, and containerd runs them. What broke was anything that reached into /var/run/docker.sock on nodes expecting to see Kubernetes’ containers there.
Two more node requirements from the v1.37 source are worth knowing. The kubelet’s failCgroupV1 setting defaults to true, so it refuses to start on a host still using cgroup v1. And the kubelet and runtime must agree on the cgroup driver, systemd on modern distributions.
kube-proxy and the network plugin
Most nodes also run kube-proxy, which watches Services and EndpointSlices and programs the kernel (nftables or iptables rules, or IPVS) so traffic to a Service’s virtual IP lands on a real Pod. Some CNI plugins, such as Cilium, replace it entirely with eBPF. The networking group covers this in EndpointSlices and kube-proxy.
Heartbeats: proving the node is alive
The control plane needs to tell “this node is quiet” from “this node is dead”. The kubelet sends two kinds of heartbeat:
- It renews a Lease object named after the node in the
kube-node-leasenamespace. The lease lasts 40 seconds and the kubelet renews it at a quarter of that, every 10 seconds. A Lease is tiny, so this is cheap. - It updates Node status when something changes, and at least every 5 minutes otherwise.
The node lifecycle controller in the controller manager watches both. In v1.37 its grace period defaults to 50 seconds. When that passes without a heartbeat, it sets the Ready condition to Unknown and taints the node node.kubernetes.io/unreachable with effects NoSchedule (no new Pods) and NoExecute (evict existing ones). Pods get a default toleration of 300 seconds for that taint, so they are evicted and replaced elsewhere about five minutes later.
The lab shows the split cleanly. Two fake nodes, node-a and node-b, were created Ready. A shell loop renewed a Lease for node-a every 10 seconds, playing kubelet; node-b got nothing:
t=0s node-a=Ready node-b=Ready
t=41s node-a=Ready node-b=Ready
t=51s node-a=Ready node-b=Ready
t=61s node-a=Ready node-b=NotReady taints-b=node.kubernetes.io/unreachable (x2)
kubectl get node node-b then showed Ready Unknown NodeStatusUnknown Kubelet stopped posting node status. and the two taints, unreachable:NoSchedule and unreachable:NoExecute. The Lease alone kept node-a healthy.
About the video
The embed is the “Nodes” chapter of Anton Putra’s “Kubernetes Architecture: Deep Dive - Part 2” (June 2024), from 16:04 to the end, under five minutes. Its sub-chapters, per the description, are the kubelet, kube-proxy and the container runtime. It is the short tour; this lesson adds the CRI calls, the sandbox, heartbeats and static Pods. English was judged from the “English (US) original” audio track. Phil Estes’ KubeCon talk in deeper is the long version of the runtime story from a containerd maintainer, recorded before dockershim was removed, so ignore anything it says about Docker as a current kubelet runtime.
What was run: the Lease and node-condition output above came from a local v1.37.3 control plane whose nodes are fake Node objects with no kubelet, on 2026-11-28. The kubelet defaults (lease duration, renew fraction, status report frequency, runtime endpoint, failCgroupV1) and the node controller’s 50-second grace period were read from the v1.37.3 source. The CRI calls are from api.proto. Nothing here started a container.
Where this fits
Everything so far has been components talking through one API. Next, the API itself: the Kubernetes API and object model.
Check yourself
A Pod is bound to a node, but the node's containerd service is stopped. What does the kubelet do, and what do you see?
The kubelet cannot reach the CRI socket, so it cannot create the sandbox or containers. It reports the runtime as down, the node usually goes NotReady, and the Pod stays Pending or shows errors in its events. The kubelet is only the manager; the runtime does the work.
Why does a two-container Pod show three containers when you list them with crictl on the node?
The runtime creates a Pod sandbox first, which with containerd and CRI-O includes a small pause container holding the shared network namespace. The two app containers join it, so the sandbox outlives container restarts and the Pod keeps its IP.
A node loses power. Roughly when does Kubernetes notice, and when are its Pods recreated elsewhere?
Its Lease stops being renewed. After the 50-second grace period the node lifecycle controller sets Ready to Unknown and adds NoExecute and NoSchedule taints for node.kubernetes.io/unreachable. Pods tolerate that taint for 300 seconds by default, then they are evicted and their controllers create replacements on other nodes.
How do kubeadm clusters run the API server before there is an API server to schedule it?
As static Pods. The kubelet reads manifests from a local directory, usually /etc/kubernetes/manifests, and runs them directly. It then posts read-only mirror Pods to the API so you can see them with kubectl.
Go deeper
Notes
Notes are saved to your account.
Everything else on this page works without one — progress and bookmarks keep themselves in this browser and come with you when you sign in. Notes are the one thing worth not trusting to a browser you might clear.
Your notes could not be loaded.