This chapter covers
- Learning what the kubelet does on a Node
- Exploring how the kubelet is configured on a Node
- Connecting container runtimes with the kubelet
- Launching containers with the kubelet
- Comprehending how the kubelet control the Pod lifecycle
- Understanding the Container Runtime Interface
- Walking through the go interfaces inside of the kubelet and CRI
As you know, the kubelet is the workhorse of a Kubernetes cluster, and there may be thousands of kubelets in a production data center.
In this chapter, we’ll go through the internals of what the kubelet does and precisely how the kubelet leverages the container runtime interface (CRI) to run containers and manage the lifecycle of workloads. One of the kubelet’s jobs is to start and stop containers, and CRI is a defined interface that the kubelet uses to interact with container runtimes. containerd, for example, is categorized as a container runtime, as it takes an image and creates a running container. Docker engine is another container runtime tool, but is now depreciated by the Kubernetes community, in favor of containerd, runC, or other runtimes.
Note
We want to thank Dawn Chen for allowing us to interview her about the kubelet. Dawn is the original author of the kubelet binary and is currently one of the leads of the Kubernetes Node Special Interest Group. This group maintains the kubelet code base.