2.10 Priority Classes
- Kubernetes allows running workloads (pods) with different priorities to ensure that critical applications always get the resources they need.
- For example, Kubernetes control plane components must always run, even if lower-priority applications need to be terminated.
πΉ What Are Priority Classes?
Priority Classes define the scheduling importance of workloads in Kubernetes.
They determine which pods get scheduled first and which can be preempted (evicted) when resources are scarce.
- Higher priority workloads are scheduled before lower priority ones.
- If necessary, lower-priority pods may be terminated to make room for higher-priority pods.
- Priority Classes are non-namespaced objects, meaning they are available cluster-wide and can be applied to pods in any namespace.
πΉ Priority Range

- Priority values are represented as integers.
- The general range for user workloads is between -2,000,000,000 and +1,000,000,000.
- Higher numbers represent higher priority.
- Kubernetes system-critical components (like control plane pods) use values up to 2,000,000,000, ensuring they are never preempted by regular workloads.
π§Ύ PriorityClass Definition (Click to Expand)
π§© Pod Using PriorityClass (Click to Expand)
βοΈ Default PriorityClass (Click to Expand)
π« Non-Preempting PriorityClass (Click to Expand)
πΉ Default PriorityClass vs Non-Preempting PriorityClass
| Feature | Default PriorityClass | Non-Preempting PriorityClass |
|---|---|---|
| Purpose | Defines the default priority for pods that donβt specify a priorityClassName. |
Prevents pods from evicting existing lower-priority pods. |
| Key Field | globalDefault: true |
preemptionPolicy: Never |
| Effect on Pods | All pods without a defined priority class will automatically use this class. | Pods will wait in the scheduling queue until resources are available instead of preempting others. |
| Preemption Behavior | Can preempt lower-priority pods (default Kubernetes behavior). | Will not preempt any running pods, even if higher in priority. |
| Number Allowed | Only one Default PriorityClass is allowed per cluster. | You can create multiple Non-Preempting PriorityClasses. |
| Use Case | When you want to assign a baseline priority to all workloads. | When you want critical pods to have priority in scheduling but avoid disrupting running workloads. |