Question 420
At Pinecrest logistics, in a sandbox Kubernetes cluster during a recovery tabletop exercise: The Deployment dispatch-api in namespace fulfillment must target nodes labeled workload=restricted in a disposable lab. Work only within the stated target and verify before declaring success. Which operational control most directly prevents this failure or configuration drift?
Explanation
Correct Answer
Control privileged node labels and review availability before adding hard scheduling constraints. This reduces recurrence of the specific operational failure. It reinforces the action: Run kubectl -n fulfillment patch deployment dispatch-api --type=merge -p '{"spec":{"template":{"spec":{"nodeSelector":{"workload":"restricted"}}}}}'. The relevant mechanism is: Node selectors constrain scheduling to nodes whose labels match all specified key/value pairs; patching the Pod template triggers a rollout.
Incorrect Answers
The suggested review tracks a different technical risk: CronJob suspension prevents new scheduled Jobs but does not terminate existing Jobs already running. Here the sustained control must address: Node selectors constrain scheduling to nodes whose labels match all specified key/value pairs; patching the Pod template triggers a rollout. Choose “Control privileged node labels and review availability before adding hard scheduling constraints”.
That safeguard is relevant to: A Deployment tracks ReplicaSet revisions and rollout undo restores a recorded earlier Pod template. The current failure instead follows from: Node selectors constrain scheduling to nodes whose labels match all specified key/value pairs; patching the Pod template triggers a rollout. Its prevention measure is “Control privileged node labels and review availability before adding hard scheduling constraints”.
This routine guards against another mechanism: Rollout restart annotates the Pod template so the Deployment controller replaces Pods according to its rollout strategy. The recurring exposure in the current case is: Node selectors constrain scheduling to nodes whose labels match all specified key/value pairs; patching the Pod template triggers a rollout. The matching preventive check is “Control privileged node labels and review availability before adding hard scheduling constraints”.