KCNA practice question 12 of 25

What happens with a regular Pod running in Kubernetes when a node fails?

Full set: 240 questions
Answer options
A: A new Pod with the same UID is scheduled to another node after a while.
B: A new, near-identical Pod but with different UID is scheduled to another node. Correct answer
C: By default, a Pod can only be scheduled to the same node when the node fails.
D: A new Pod is scheduled on a different node only if it is configured explicitly.
Correct Answer:
B. A new, near-identical Pod but with different UID is scheduled to another node.
Explanation

In Kubernetes, standalone Pods are not rescheduled upon node failure. However, a "regular" Pod in a production context is almost always managed by a higher-level controller like a Deployment or ReplicaSet. When a node fails, the controller manager detects that the Pod is gone. To maintain the desired state (i.e., the specified number of replicas), the controller's logic creates a new Pod based on the same template. This new Pod is a near-identical replacement but is a distinct object with a new, unique UID and name, and the scheduler places it on a healthy node.

Why Incorrect

A. A new Pod is always assigned a new, unique UID. The UID is an immutable identifier for the lifetime of an object.
C. The purpose of orchestration is to maintain availability; scheduling a replacement Pod on a failed node would be counterproductive and is not the default behavior.
D. This rescheduling behavior is the default, core function of controllers like Deployments and ReplicaSets; no explicit configuration is needed for this high-availability feature.

References

1. Kubernetes Authors. (n.d.). Pods - Pod Lifecycle. Kubernetes Documentation. Retrieved from https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/. This page explains that "Pods do not, by themselves, self-heal... If a Pod is scheduled to a Node that then fails... the Pod is deleted... For a Pod to be automatically replaced, you should use a workload resource that includes a controller."

2. Kubernetes Authors. (n.d.). ReplicaSet. Kubernetes Documentation. Retrieved from https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/. This document states, "A ReplicaSet's purpose is to maintain a stable set of replica Pods running at any given time. As such, it is often used to guarantee the availability of a specified number of identical Pods."

3. The Linux Foundation. (2023). Kubernetes and Cloud Native Associate (KCNA) Curriculum v1.2. Section 2.3, Workloads. This section covers controllers like Deployments and their role in maintaining the desired state, which includes replacing Pods after a node failure.

Scroll to Top