What happens when a new pod with a higher priority is scheduled but the cluster lacks free resources?
Think about how Kubernetes manages resources when priorities differ.
Kubernetes uses pod priority and preemption to ensure higher priority pods can run by evicting lower priority pods if needed.
What is the output of the following command when a pod is preempted due to priority?
kubectl describe pod low-priority-pod
Look for event messages related to preemption in pod description.
The pod description shows an event with reason 'Preempted' indicating it was evicted to make room for a higher priority pod.
Which YAML snippet correctly defines a PodPriorityClass named high-priority with value 1000 and global default set to false?
Check the correct apiVersion and data types for fields.
The correct apiVersion is scheduling.k8s.io/v1. The value must be an integer, not a string. globalDefault is a boolean. Option C matches all requirements.
A high priority pod is stuck in Pending state even though lower priority pods exist. What could be a reason?
Think about what can block eviction of pods even if they have lower priority.
PodDisruptionBudgets can prevent eviction of pods even if preemption is needed, causing higher priority pods to remain pending.
Given these events, what is the correct order of actions Kubernetes takes when scheduling a high priority pod that requires preemption?
Think about the logical sequence from detecting resource shortage to scheduling.
The scheduler first detects resource shortage, then selects pods to preempt, evicts them, and finally schedules the new pod.