Container Orchestration
medium

Pregunta de Container Orchestration #019e3a4f

Enunciado de la Pregunta
Container Orchestration
#cri
#kubelet
#container-runtime
Medio

The Container Runtime Interface (CRI) defines the protocol for the communication between:

A

The kubelet and the container runtime.

Correcto
B

The container runtime and etcd.

C

The kube-apiserver and the kubelet.

D

The container runtime and the image registry.

Explicación Oficial / Explicaciones de la Comunidad

The Container Runtime Interface (CRI) is a plugin interface that enables the kubelet to use a variety of container runtimes without needing to recompile the kubelet. It defines the protocol (gRPC) and API for communication between the kubelet and the container runtime. The kubelet acts as a client, and the container runtime (e.g., containerd, CRI-O) implements the CRI server to manage containers and pods.

How it Works:

  • The kubelet, running on each node, is responsible for managing pods and their containers. It communicates with the container runtime via CRI to create, start, stop, and delete containers.
  • CRI uses protocol buffers and gRPC for efficient communication. The kubelet sends requests (e.g., RunPodSandbox, CreateContainer) to the runtime, which then performs the actual container operations using low-level tools like runc.
  • This abstraction allows different container runtimes to be used interchangeably as long as they implement the CRI specification.

Why the correct value is right:
The kubelet and the container runtime are the two components that directly interact via CRI. The kubelet needs to instruct the runtime to manage containers, and CRI standardizes this interaction.

Why the incorrect values are wrong:

  • The container runtime and etcd: etcd is a distributed key-value store used for cluster state, not for container runtime communication. The runtime does not talk to etcd.
  • The kube-apiserver and the kubelet: The kube-apiserver is the front-end for the Kubernetes control plane; the kubelet communicates with it to receive pod specifications, but this communication uses the Kubernetes API, not CRI.
  • The container runtime and the image registry: While the runtime pulls images from a registry, this is done via the container runtime's own mechanisms (e.g., containerd's image pull), not through CRI. CRI focuses on container lifecycle management, not image pulling directly.