Kubernetes and Cloud Native Associate (KCNA)Kubernetes FundamentalsHard

A platform engineer is debugging an issue where a newly deployed Pod is stuck in a 'Pending' state. They have checked the Pod's YAML manifest and confirmed that the image name is correct and the required PersistentVolumeClaim (PVC) is in a 'Bound' state. What is the most likely reason for the Pod remaining in 'Pending'?

  1. AThere are insufficient resources (CPU or memory) on any available node to satisfy the Pod's requests.
  2. BThe Pod's `livenessProbe` is failing, causing it to restart continuously.
  3. CThe `kube-proxy` component is not running on the worker nodes.
  4. DThe Pod's `readinessProbe` is failing, preventing it from becoming ready.
Show answer & explanation

Correct answer: A. There are insufficient resources (CPU or memory) on any available node to satisfy the Pod's requests.

A Pod remaining in 'Pending' state, despite a valid image and bound PVC, often indicates that the Kubernetes scheduler cannot find a suitable node to place the Pod on. The most common reason for this is a lack of available resources (CPU/memory) to satisfy the Pod's requests.

Why the other options are wrong

  • B. A failing `livenessProbe` would cause the container to restart, leading to a 'CrashLoopBackOff' or similar status, not 'Pending'.
  • C. `kube-proxy` issues would impact network connectivity for Services, not prevent a Pod from being scheduled to a node and starting its containers.
  • D. A failing `readinessProbe` would prevent the Pod from transitioning to 'Ready' but typically wouldn't keep it in 'Pending'; it would be 'Running' but not 'Ready'.

Pod 'Pending' State

A Pod in the 'Pending' state means it has been accepted by the Kubernetes cluster but one or more of its containers has not been created or started yet. This often indicates a scheduling issue.

  • Common causes: insufficient resources (CPU/memory) on nodes.
  • Also caused by unbound PVCs, node selectors/affinity not matching.
  • Use `kubectl describe pod <pod-name>` to get scheduler events and reasons.

Memory trick: Pending Pods Ponder Placement Problems

More Kubernetes Fundamentals questions