Member-only story

DevOps in K8s — PriorityClass

DevOps in K8s bootcamp series

Tony
4 min readOct 16, 2023

Note, full “DevOps in K8s” mind map is available at: “DevOps in K8s Mind Map

What is PriorityClass

In K8s, PriorityClass is a non-namespaced object that defines a mapping from a priority class name to the integer value of the priority. It allows you to establish a priority for the pods, ensuring that more important pods are scheduled ahead of others, or even that they get the necessary resources during times of resource scarcity.

An example of PriorityClass definition looks like:

apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
name: high-priority
value: 100000
globalDefault: false
description: "Should be used for critical service pods only."
  • name: Name of the PriorityClass.
  • value: An integer that defines the rank/importance of this class.
  • globalDefault: If set to true, all pods without an explicit priorityClassName will use this class. Only one PriorityClass should be marked as globalDefault.
  • description: An arbitrary string that describes what the PriorityClass is used for.

The value field

--

--

Tony
Tony

No responses yet