简体   繁体   English

关于Kubernetes QoS与调度关系的说明

[英]Clarification on Kubernetes QoS relation to scheduling

According to https://kubernetes.io/docs/tasks/configure-pod-container/quality-service-pod/根据https://kubernetes.io/docs/tasks/configure-pod-container/quality-service-pod/

Kubernetes uses QoS classes to make decisions about scheduling and evicting Pods. Kubernetes 使用 QoS 类来制定有关调度和驱逐 Pod 的决策。

I don't understand how do QoS classes have anything to do with scheduling?我不明白 QoS 类与调度有什么关系? The documentation mentions that QoS classes determine eviction order in case of a node going out of resources.该文档提到,在节点耗尽资源的情况下,QoS 类确定驱逐顺序。

On the other hand, scheduling uses pod priorities (PriorityClass) to set the scheduling order and preemption.另一方面,调度使用 pod 优先级(PriorityClass)来设置调度顺序和抢占。

My question is what is the link between QoS and scheduling?我的问题是 QoS 和调度之间的联系是什么?

My question is what is the link between QoS and scheduling?我的问题是 QoS 和调度之间的联系是什么?

According to https://kubernetes.io/docs/concepts/scheduling-eviction/kube-scheduler/根据https://kubernetes.io/docs/concepts/scheduling-eviction/kube-scheduler/

kube-scheduler selects a node for the pod in a 2-step operation: kube-scheduler 通过两步操作为 pod 选择一个节点:

 Filtering Scoring

The filtering step finds the set of Nodes where it's feasible to schedule the Pod.过滤步骤找到可以调度 Pod 的节点集。 For example, the PodFitsResources filter checks whether a candidate Node has enough available resource to meet a Pod's specific resource requests.例如,PodFitsResources 过滤器检查候选节点是否有足够的可用资源来满足 Pod 的特定资源请求。 After this step, the node list contains any suitable Nodes;在这一步之后,节点列表包含任何合适的节点; often, there will be more than one.通常,会有不止一个。 If the list is empty, that Pod isn't (yet) schedulable.如果列表为空,则该 Pod (尚)不可调度。

In the scoring step, the scheduler ranks the remaining nodes to choose the most suitable Pod placement.在评分步骤中,调度程序对剩余节点进行排名以选择最合适的 Pod 放置。 The scheduler assigns a score to each Node that survived filtering, basing this score on the active scoring rules.调度程序根据活动评分规则为每个通过过滤的节点分配一个分数。

Finally, kube-scheduler assigns the Pod to the Node with the highest ranking.最后,kube-scheduler 将 Pod 分配给排名最高的 Node。 If there is more than one node with equal scores, kube-scheduler selects one of these at random.如果有多个相同分数的节点,kube-scheduler 会随机选择其中一个。

So the QoS takes a role in Filtering step of kube-scheduler operation that corresponding PodFitsResources filter.因此,QoS 在相应 PodFitsResources 过滤的 kube-scheduler 操作的过滤步骤中发挥作用。

According to https://kubernetes.io/docs/reference/scheduling/policies/根据https://kubernetes.io/docs/reference/scheduling/policies/

PodFitsResources: Checks if the Node has free resources (eg, CPU and Memory) to meet the requirement of the Pod. PodFitsResources:检查 Node 是否有空闲资源(例如 CPU 和内存)来满足 Pod 的需求。

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

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