Container Orchestration
medium

Questão de Container Orchestration #019e3a4f

Enunciado da Questão
Container Orchestration
#kubernetes
#kubelet
#pod
#node agent
Médio

What is the purpose of the kubelet component within a Kubernetes cluster?

A

A dashboard for Kubernetes Clusters that allows management and troubleshooting of applications.

B

A network proxy that runs on each node in your cluster, implementing part of the Kubernetes Service concept.

C

A component that watches for newly created Pods with no assigned node, and selects a node for them to run on.

D

An agent that runs on each node in the cluster. It makes sure that containers are running in a Pod.

Correta

Explicação Oficial / Explicações da Comunidade

The kubelet is the primary node agent that runs on each node in a Kubernetes cluster. Its core responsibility is to ensure that containers are running in a Pod as specified by the PodSpec (a YAML or JSON object that describes a pod). The kubelet takes a set of PodSpecs that are provided through various mechanisms (primarily the API server) and ensures that the containers described in those PodSpecs are running and healthy. It does not manage containers that were not created by Kubernetes.

How it works:
The kubelet registers the node with the Kubernetes API server and continuously monitors the node's state. It watches for Pod objects that are scheduled to its node (via the nodeName field in the Pod spec) and uses the container runtime (e.g., Docker, containerd) to start, stop, and manage the containers. The kubelet also performs health checks (liveness and readiness probes) and reports the status of pods back to the API server. It manages the lifecycle of pods, including pulling container images, mounting volumes, and handling container restarts.

Why the correct answer is right:
The description "An agent that runs on each node in the cluster. It makes sure that containers are running in a Pod" accurately captures the kubelet's role. It is indeed an agent that runs on every node and ensures that the containers defined in the PodSpec are running and healthy.

Why the incorrect answers are wrong:

  • "A dashboard for Kubernetes Clusters that allows management and troubleshooting of applications" describes the Kubernetes Dashboard, a web-based UI, not the kubelet.
  • "A network proxy that runs on each node in your cluster, implementing part of the Kubernetes Service concept" describes kube-proxy, which handles network proxying and load balancing for Services.
  • "A component that watches for newly created Pods with no assigned node, and selects a node for them to run on" describes the scheduler, which assigns pods to nodes based on resource availability and constraints.