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

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.

主站蜘蛛池模板: 陇南市| 顺义区| 柳河县| 新津县| 平舆县| 文登市| 台山市| 兴仁县| 金门县| 安泽县| 白朗县| 兴文县| 南雄市| 信丰县| 蒙自县| 绩溪县| 页游| 乐昌市| 星座| 五大连池市| 通许县| 巴青县| 容城县| 收藏| 昌黎县| 健康| 阜城县| 石家庄市| 顺平县| 灯塔市| 木兰县| 招远市| 朝阳市| 彩票| 于田县| 砀山县| 泰安市| 余干县| 循化| 柳河县| 乌什县|