Question 470
At Northstar finance, in an isolated training cluster during a scheduled maintenance rehearsal: Deployment invoice-api in ledger requires maxUnavailable=0 and maxSurge=1 for a RollingUpdate rollout in the lab. Work only within the stated target and verify before declaring success. Which Kubernetes behavior best explains the required change or diagnosis?
Explanation
Correct Answer
Deployment rolling-update parameters govern how many old Pods may be unavailable and extra Pods may be created during replacement. This explains the stated condition. The corresponding action is: Run kubectl -n ledger patch deployment invoice-api --type=merge -p '{"spec":{"strategy":{"type":"RollingUpdate","rollingUpdate":{"maxUnavailable":0,"maxSurge":1}}}}'. The direct acceptance evidence is: Run kubectl -n ledger get deployment invoice-api -o jsonpath='{.spec.strategy.rollingUpdate}' and verify the values.
Incorrect Answers
This principle describes a separate cause: Node selectors constrain scheduling to nodes whose labels match all specified key/value pairs; patching the Pod template triggers a rollout. The reported condition is governed by: Deployment rolling-update parameters govern how many old Pods may be unavailable and extra Pods may be created during replacement. The two mechanisms should not be conflated.
Environment variables are copied into new container processes from ConfigMap values; existing running processes need replacement to pick up changes. That explanation applies to a different technical failure. Here the controlling principle is: Deployment rolling-update parameters govern how many old Pods may be unavailable and extra Pods may be created during replacement.
This principle describes a separate cause: Kubernetes Secrets are API objects intended for sensitive values, but literals in a shell command can leak via shell history and process observation. The reported condition is governed by: Deployment rolling-update parameters govern how many old Pods may be unavailable and extra Pods may be created during replacement. The two mechanisms should not be conflated.