mid
intermediate
Kubernetes
Kubernetes Kubelet
Question
What is the role of the kubelet in a Kubernetes cluster? How does it interact with the control plane?
Answer
The kubelet is an agent running on each worker node. It receives Pod specifications from the API server, ensures containers are running in those pods, reports node and pod status back to the control plane, and manages pod lifecycle including health checks. It's the bridge between the Kubernetes control plane and container runtime.
Why This Matters
Understanding kubelet is essential for troubleshooting node-level issues. When pods fail to start or behave unexpectedly, kubelet logs often reveal the root cause. The kubelet also handles resource limits, volume mounting, and liveness/readiness probes.
Code Examples
Kubelet troubleshooting
bash
Kubelet configuration
yaml
Common Mistakes
- Not checking kubelet logs when pods fail to start
- Misconfiguring eviction thresholds leading to unexpected pod evictions
- Forgetting that kubelet needs container runtime (containerd/cri-o) to be running
Follow-up Questions
Interviewers often ask these as follow-up questions
- What happens when the kubelet loses connection to the API server?
- How does the kubelet determine if a pod is healthy?
- What is the difference between kubelet and kube-proxy?
Tags
kubernetes
kubelet
nodes
architecture
containers