Question 9
Container OrchestrationWhich object ensures the desired number of Pods is always running?
Correct answer: A
Explanation
A Deployment manages a ReplicaSet and maintains the specified replica count, so it keeps the desired number of Pods running. It also supports rolling updates and self-healing by replacing Pods that fail or are deleted.
Why each option is right or wrong
A. Deployment
Under the Kubernetes API, a Deployment (apps/v1) is the controller used to declare the desired state for a workload, including the replica count in the Pod template. It creates and manages ReplicaSets, and the ReplicaSet controller continuously reconciles actual Pods to the specified number, replacing any that are deleted or fail so the count remains at the requested value.
B. ReplicaSet
C. Service
D. ConfigMap