Kubernetes and Cloud Native Associate (KCNA) — Question 153
What happens with a regular pod running in Kubernetes when a node fails?
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.
- 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
Explanation
When a node fails, Kubernetes will create a new pod with a different UID on another node to maintain the desired state of the application. This is because pods are ephemeral and designed to be replaceable, thus ensuring application availability. The other options are incorrect as they either suggest the same UID or impose restrictions that do not align with Kubernetes' default behavior.