Kubernetes
medium

Pregunta de Kubernetes #019e3a4f

Enunciado de la Pregunta
Kubernetes
#kubernetes
#pod
#pending
#container-images
Medio

If a Pod was waiting for container images to download on the scheduled node, what state would it be in?

A

Failed

B

Succeeded

C

Unknown

D

Pending

Correcto

Explicación Oficial / Explicaciones de la Comunidad

A Pod enters the Pending state when it has been accepted by the Kubernetes cluster but one or more of its containers are not yet running. This commonly occurs while the container images are being downloaded to the scheduled node. The Pending state indicates that the Pod is waiting for some condition to be met, such as image pull completion, volume mounting, or node resource availability.

How it Works

When a Pod is created, the scheduler assigns it to a node. The kubelet on that node then begins to pull the required container images from the registry. During this image download phase, the Pod remains in the Pending state. Once all images are successfully pulled and containers start, the Pod transitions to Running. If image pulling fails (e.g., due to authentication errors or network issues), the Pod may remain Pending or eventually move to a Failed state depending on the restart policy.

Why the Correct Value is Right

  • Pending is the correct state because the Pod is waiting for the container images to be downloaded. The Kubernetes API reports the Pod status as Pending until all containers are running.

Why the Incorrect Values are Wrong

  • Failed: This state indicates that all containers in the Pod have terminated, and at least one container has terminated in failure (non-zero exit code). It does not apply while images are still being downloaded.
  • Succeeded: This state indicates that all containers in the Pod have terminated successfully (exit code 0). It is not relevant during image download.
  • Unknown: This state means the Pod's status could not be obtained, typically due to a communication error with the node. It is not the expected state during a normal image pull.