A batch invoice worker can tolerate brief downtime but must never run old and new code together. Which Deployment strategy type fits that downtime tolerance and mutual-exclusion need?
Select an answer to reveal the explanation.
Short Explanation
Some upgrades need a clear stage swap—lights out on the old cast, then the new cast enters. Recreate tears down the old Pods first so versions never overlap, accepting a short downtime window RollingUpdate tries to avoid.
Full Explanation
A batch invoice worker that can tolerate brief downtime but must never run old and new code together needs the Recreate Deployment strategy. Recreate terminates all old Pods before creating new ones, giving a clean mutual-exclusion window so two schema-sensitive invoice processor versions never overlap. For municipal finance jobs where mixed-version workers could double-post or corrupt ledger-adjacent side effects, that hard cutover matches the requirement better than a rolling overlap.
Why the other options fail by concept: RollingUpdate with maxUnavailable 0 maximizes overlap of old and new (via surge), which is the opposite of mutual exclusion. A DaemonSet is a different workload kind for per-node agents, not a Deployment strategy choice, and DaemonSets do update. A Job with parallelism equal to replica count changes the workload API and lifecycle semantics; it is not how you configure Deployment cutover behavior.
Exam caveat: Recreate implies downtime equal to shutdown plus pull/start time—acceptable here, but wrong for user-facing APIs that need maxUnavailable 0. Combine Recreate with readiness/startup probes so the new cohort is actually healthy before traffic or cron triggers resume. Persistent identity/locking outside Kubernetes may still be required if external invoice systems cannot tolerate two generations even seconds apart.
Operational check: Set spec.strategy.type=Recreate on the invoice Deployment, apply, and watch kubectl get pods -w during an image change: old Pods should terminate before new Pods appear. Confirm no overlapping Ready Pods of mixed images via kubectl get pods -o wide and image columns during the cutover window.