简体   繁体   English

Kube.netes pod 优先级

[英]Kubernetes pod priority

i am new to kube.netes.我是 kube.netes 的新手。

How can I make sure that system-critical pods always run and cannot be displaced by other pods?我如何确保系统关键的 pod 始终运行并且不会被其他 pod 取代? 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?我是否必须将这些关键 Pod 设置为“系统集群关键”或“系统节点关键”优先级类,或者我是否必须使用我自己的值创建另一个优先级 class?

I have found 2 options for pod priorities - priority classes and Quality of service.我找到了 Pod 优先级的 2 个选项 - 优先级和服务质量。 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/ ) ( 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. Pod 优先级可以被认为是来自调度点的东西,这样优先级更高的 Pod 总是被调度到节点上。 In case there are lower priority pods, then shall be re-scheduled to allow higher pod priority ones.如果存在优先级较低的 pod,则应重新安排以允许优先级较高的 pod。

QoS is for decision making based on classes it takes (Guaranteed, Burstable, BestEffort). QoS 用于根据它采用的类别(保证、可突发、尽力而为)进行决策。 To put simply this mostly comes where we dedicate certain resources for pod to perform.简而言之,这主要发生在我们为 Pod 执行某些资源的地方。 For example, a request of 1GB of memory means this pod is of Burstable and can grow.比如请求1GB的memory,说明这个pod是Burstable的,可以增长。

One can use both on a single pod and have a much controlled environment for his pod.一个人可以在单个 pod 上同时使用两者,并为他的 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 .要将 Pod 标记为关键,请将该 Pod 的priorityClassName设置为system-cluster-criticalsystem-node-critical system-node-critical is the highest available priority, even higher than system-cluster-critical system-node-critical 是可用的最高优先级,甚至高于 system-cluster-critical

spec:
  priorityClassName: system-cluster-critical

Refer below link.请参考以下链接。 https://kube.netes.io/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/ https://kube.netes.io/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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