liveBook · Manning

PriorityClass

As explained in Kubernetes for Developers

A PriorityClass is a Kubernetes resource that defines a priority value and related preemption behavior for Pods.

A PriorityClass assigns Pods a numeric priority and controls whether they may preempt lower-priority Pods. Kubernetes uses that value when scheduling, evicting, and resolving temporary capacity shortages. section 5.1.3

The priority value affects several operational decisions:

  • Scheduling: when many Pods are pending, the scheduler places higher-priority Pods first. section 5.1.3
  • Eviction: Kubernetes considers priority first, then how far a Pod exceeds its resource requests; Pods within their requests are not at risk because of priority alone. section 5.1.3
  • Preemption: PreemptLowerPriority allows a higher-priority Pod to displace lower-priority Pods when capacity is unavailable; Never disables that behavior. section 5.1.3
  • Recovery: Pods removed through eviction or preemption return to Pending when managed by a Deployment or another workload controller. section 5.1.3

Reserve spare capacity with a placeholder workload

A low-priority placeholder Deployment can reserve capacity on existing nodes. When real workloads scale up, their higher priority preempts the placeholders, allowing them to start without waiting for new nodes. A placeholder class can use value -10 and preemptionPolicy Never; size its replicas and resource requests so real workloads can fit after displacement. section 6.3.2

How Kubernetes for Developers covers it

How deep it goes
Explains scheduling, eviction, preemption, and managed-workload recovery, with YAML examples but not full API reference.
Examples
Uses critical-service manifests, a timeserver Deployment, and low-priority placeholder Pods for spare-capacity autoscaling.
What you can do after
Configure workload ordering and preemption with PriorityClass manifests and priorityClassName settings on Deployments.
How it connects
Connects PriorityClass to Pods, the scheduler, eviction, preemption, resource requests, Deployments, and cluster autoscaling.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kubernetes for Developers. The section links point to the parts of the book it draws on.