Kubelet: The Node Agent
What you'll learn: How the kubelet acts as Kubernetes' on-the-ground manager, ensuring containers run exactly as instructed on each worker node.
What is the Kubelet?
The kubelet is the primary "node agent" that runs on every worker node in your Kubernetes cluster. Think of it as a foreman on a construction site—while the control plane (API Server, Scheduler, etc.) makes decisions about what should be built and where, the kubelet is the one actually doing the hands-on work on each individual node.
The kubelet doesn't run inside a container; it's a system process installed directly on the node's operating system.
Core Responsibilities
The kubelet's main job is pod lifecycle management. Here's what that means:
- Receives instructions: The kubelet watches the API Server for pod specifications assigned to its node
- Starts containers: It tells the container runtime (like Docker or containerd) to pull images and start containers according to the pod spec
- Monitors health: Continuously checks if containers are running and healthy
- Reports status: Sends heartbeat signals and pod/container status back to the API Server
- Handles failures: Restarts failed containers based on restart policies
The Kubelet's Communication Flow
The kubelet acts as a bridge between the Kubernetes control plane and the actual container runtime on the node. It translates high-level pod definitions into low-level container operations, ensuring what the Scheduler decided becomes reality.
If a pod should be running but isn't, the kubelet takes corrective action. If a container crashes, the kubelet restarts it (depending on the restart policy).
Key Takeaway: The kubelet is Kubernetes' local enforcement agent—it ensures every worker node faithfully executes its assigned pods, monitors their health, and keeps the control plane informed of what's actually happening on the ground.