In Kubernetes we can set the priority of a pod to Guaranteed
, Burstable
or Best-Effort
base on requests and limits. Another method to assign priorities in Kubernetes is to define a priorityClass
object and assign a priorityClassName
to a pod. How are these methods different and when we have to choose one method over another? According to https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#interactions-of-pod-priority-and-qos:
The scheduler’s preemption logic does not consider QoS when choosing preemption targets. Preemption considers Pod priority and attempts to choose a set of targets with the lowest priority.
So if the Kubernetes has to choose between a pod with Guaranteed
QoS which has a lower "priorityClass" Value than a Burstable
pod, does it put the Guaranteed
pod in Preempting state?
Guaranteed
pod, and each node have 200MiB free memory, when I apply a new deployment with HIGHER priority pods which requests 400MiB memory (but have limit of 500MiB i.e.Burstable
) scheduler preempt previousguaranteed
pods to schedule these newBurstable
pods. (b) a node running a HIGHER priorityBurstable
pod and a LOWER priorityguranteed
pod. Then the node has no availabe resource and has to evict one, it will evict the HIGHER priorityBurstable
pod. – Bunde