KCNA Scheduling and Scaling 2 — Questions and Answers
Question 1: Which field in a Pod spec allows you to specify a custom scheduler instead of the default one?
- schedulerName (Correct answer)
- priorityClassName
- nodeName
- runtimeClassName
Correct answer: schedulerName
The `schedulerName` field in a Pod's spec tells Kubernetes which scheduler should bind the pod to a node.
Question 2: A node has the taint `env=prod:NoExecute`. Which toleration allows an existing pod to remain on that node?
- key: env, operator: Equal, value: prod, effect: NoExecute (Correct answer)
- key: env, operator: Exists, effect: NoSchedule
- key: prod, operator: Equal, value: env, effect: NoExecute
- key: env, operator: Equal, value: prod, effect: NoSchedule
Correct answer: key: env, operator: Equal, value: prod, effect: NoExecute
A NoExecute toleration must match the taint's key, value, and effect exactly to prevent eviction of an already-running pod.
Question 3: What does the `minAvailable` field in a PodDisruptionBudget specify?
- The minimum number of pods that must remain available during a voluntary disruption (Correct answer)
- The minimum number of pods to scale up to under load
- The minimum number of replicas in a Deployment
- The minimum percentage of nodes that must be schedulable
Correct answer: The minimum number of pods that must remain available during a voluntary disruption
`minAvailable` defines how many pods (absolute or percentage) must stay running when voluntary disruptions occur.
Question 4: A VerticalPodAutoscaler in 'Off' mode does which of the following?
- Computes recommendations without applying them (Correct answer)
- Disables autoscaling entirely and removes existing recommendations
- Applies recommendations only on pod restart
- Scales pods horizontally instead of vertically
Correct answer: Computes recommendations without applying them
'Off' mode causes VPA to calculate and expose resource recommendations without modifying any pods.
Question 5: Which Kubernetes object defines the relative priority of pods when the scheduler must preempt lower-priority pods?
- PriorityClass (Correct answer)
- LimitRange
- ResourceQuota
- PodDisruptionBudget
Correct answer: PriorityClass
A PriorityClass assigns an integer priority value to pods; the scheduler uses this to determine which pods to preempt when resources are scarce.
Question 6: A Horizontal Pod Autoscaler targets 50% CPU utilization. Current utilization is 80% across 4 pods. How many replicas will HPA target?
- 7 (Correct answer)
- 4
- 6
- 8
Correct answer: 7
HPA calculates ceil(4 × (80/50)) = ceil(6.4) = 7 replicas to bring utilization to the target.
Question 7: Which field in a Pod spec directly pins the pod to a specific node by name, bypassing the scheduler entirely?
- nodeName (Correct answer)
- nodeSelector
- affinity.nodeAffinity
- tolerations
Correct answer: nodeName
Setting `nodeName` skips scheduling altogether and forces the pod onto the named node.
Which field in a Pod spec allows you to specify a custom scheduler instead of the default one?