Priority Class


PriorityClassName is a Kubernetes feature used to prioritize Pods within a cluster. It allows you to assign a priority value to Pods, ensuring that high-priority Pods receive preferential treatment when it comes to resource allocation and scheduling.

How Does PriorityClassName Work?

PriorityClassName is primarily used to define the priority level for a Pod. It involves the following components:

  • Priority Class: A Kubernetes resource that defines a set of attributes (e.g., priority value) that can be associated with Pods.

  • Priority Value: An integer value assigned to a Priority Class. Higher values indicate higher priority. Pods with higher priority values are scheduled and allocated resources before Pods with lower priority values.

  • Default Priority Class: Kubernetes provides a default Priority Class with a priority value of 0. Any Pod that does not specify a Priority Class will be assigned this default priority value.

Kubernetes-Provided Priority Classes

Kubernetes provides below PriorityClasses to help categorize workloads:

  • system-cluster-critical: Kubernetes system components that are critical to the entire cluster. Priority value: 2000001000
  • system-node-critical: Kubernetes system components that are critical to individual nodes. Priority value: 2000000000

Pods that are managed by MetaKube use these PriorityClasses to ensure admin functions can reliably be fulfilled.

For more in-depth and comprehensive information on Kubernetes PriorityClassName and related concepts, we recommend referring to the official Kubernetes documentation.