简体   繁体   中英

Kubernetes pod priority

i am new to kube.netes.

How can I make sure that system-critical pods always run and cannot be displaced by other pods? Do I have to set these critical pods as "system-cluster-critical" or "system-node-critical" priorityclasses or do I have to create another priority class with my own value?

I have found 2 options for pod priorities - priority classes and Quality of service. What is the difference between them?

( https://kube.netes.io/docs/concepts/configuration/pod-priority-preemption/ https://kube.netes.io/docs/tasks/configure-pod-container/quality-service-pod/ )

Pod priority can be thought something from a scheduling point such that higher priority pod always gets scheduled on node. In case there are lower priority pods, then shall be re-scheduled to allow higher pod priority ones.

QoS is for decision making based on classes it takes (Guaranteed, Burstable, BestEffort). To put simply this mostly comes where we dedicate certain resources for pod to perform. For example, a request of 1GB of memory means this pod is of Burstable and can grow.

One can use both on a single pod and have a much controlled environment for his pod. The same links posted by you explains it further.

To mark a Pod as critical, set priorityClassName for that Pod to system-cluster-critical or system-node-critical . system-node-critical is the highest available priority, even higher than system-cluster-critical

spec:
  priorityClassName: system-cluster-critical

Refer below link. https://kube.netes.io/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM