官术网_书友最值得收藏!

kube-scheduler

The main responsibility of the Kubernetes Scheduler (kube-scheduler) component is scheduling container workloads (Kubernetes Pods) and assigning them to healthy worker nodes that fulfill the criteria required for running a particular workload.

A Pod is a group of one or more containers with a shared network and storage and is the smallest Deployment unit in the Kubernetes system. We will cover this Kubernetes object in the next section.

Scheduling is performed in two phases:

  • Filtering
  • Scoring

In the filtering phase, kube-scheduler determines the set of nodes that are capable of running a given Pod. This includes checking the actual state of nodes and verifying any resource requirements specified by the Pod definition. At this point, if there are no nodes that can run a given Pod, the Pod cannot be scheduled and remains pending. Next, in the scoring step, the scheduler assigns scores for each node based on a set of policies. Then, the Pod is assigned by the scheduler to the node with the highest score.

You can read more about available policies in the official documentation: https://kubernetes.io/docs/concepts/scheduling/kube-scheduler/#kube-scheduler-implementation.

Kubernetes design offers a great deal of extensibility and possibility to replace components. Kube-scheduler is one of the components that's used to demonstrate this principle. Even if its internal business logic is complex (all efficient scheduling heuristics are rather complex...), the scheduler only needs to watch for unassigned Pods, determine the best node for them, and inform the API Server about the assignment. You can check out an example implementation of a custom scheduler here:  https://banzaicloud.com/blog/k8s-custom-scheduler/.

Now, let's take a look at kube-controller-manager.

主站蜘蛛池模板: 阳高县| 涟源市| 定襄县| 宜阳县| 甘孜县| 大英县| 堆龙德庆县| 大理市| 北宁市| 卓尼县| 海丰县| 玉溪市| 临猗县| 淳化县| 波密县| 从化市| 大田县| 靖安县| 两当县| 扎赉特旗| 类乌齐县| 岗巴县| 芜湖县| 庆云县| 疏附县| 博野县| 三门峡市| 济源市| 桑植县| 康保县| 乐东| 宝丰县| 平原县| 临猗县| 莒南县| 望城县| 泾源县| 灵丘县| 井冈山市| 荔波县| 柳江县|