A transit agency runs long-lived API Pods under a Deployment and needs failed containers to restart automatically. Which restartPolicy is correct for those Deployment-managed Pods?
Select an answer to reveal the explanation.
Short Explanation
Deployments are built for always-on services, so their Pods use restartPolicy Always—kubelet keeps bringing the container back. Never would leave a crash as a permanent outage for that replica.
Full Explanation
A transit agency running long-lived API Pods under a Deployment that needs failed containers to restart automatically must use restartPolicy Always, which is the restartPolicy used with Deployment-managed Pods. Deployments via ReplicaSets require Always so kubelet restarts crashed containers in place and the controller can maintain long-running service capacity for riders checking schedules and service alerts.
Never leaves crashed containers stopped forever and is unsuitable for Deployment-managed APIs. OnFailure only is not what Deployments require for all replica Pods—OnFailure is associated with job-like workloads, not standard Deployment Pod templates. Manual is not a real restartPolicy that waits for SRE approval of each restart.
Exam caveat: know valid restartPolicy values Always, OnFailure, and Never, and that Deployments use Always. Operational check: inspect the Pod template restartPolicy on the transit Deployment and verify crashed containers restart rather than remaining stopped forever. This distinction matters on the CKA because distractors often mix adjacent objects that sound related but solve a different control-plane problem. This distinction matters on the CKA because distractors often mix adjacent objects that sound related but solve a different control-plane problem.