Scheduling
Priority and PDB
45 / 82

When the cluster is full, priority decides who yields, and a PDB protects against voluntary loss.

They look similar but protect against different events. A PDB does not fully protect against preemption.

payments (priority 1,000,000)Pending: cluster is fullScheduler PostFilterwould evicting lower-priority Pods help?batch-report (priority 100)gets graceful termination, then gonepayments scheduledin the freed space
PriorityClass + PDB
kind: PriorityClass
metadata: {name: business-critical}
value: 1000000
---
kind: PodDisruptionBudget
spec:
  minAvailable: 2
  selector: {matchLabels: {app: checkout}}

PDB limits voluntary disruption

Drains and upgrades wait rather than drop below minAvailable. Preemption tries to respect it but can still override it.

Use priority sparingly

A handful of classes for genuinely critical services. Too many high priorities cause surprising evictions.