Question 21
Domain 2: Workloads & SchedulingWhich Kubernetes resource is used to assign a relative scheduling importance to Pods and can trigger preemption of lower-priority Pods when resources are scarce?
Correct answer: A
Explanation
PriorityClass defines a Pod’s scheduling priority, letting Kubernetes rank Pods by importance. When resources are scarce, higher-priority Pods can trigger preemption of lower-priority Pods so they can be scheduled first.
Why each option is right or wrong
A. PriorityClass
Kubernetes assigns scheduling importance through the `PriorityClass` API object, defined in `scheduling.k8s.io/v1`, which sets the integer `value` used by the scheduler to rank Pods. Per the Kubernetes scheduler’s preemption behavior, when a node lacks sufficient resources, a higher-priority Pod may evict lower-priority Pods to make room, with the default global priority range spanning from `-2,147,483,648` to `1,000,000,000` and higher values scheduled ahead of lower ones.
B. PodDisruptionBudget
C. ResourceQuota
D. LimitRange