mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Updated theoretical node commit, secondary improvement, separate commit
This commit is contained in:
parent
1b18b3b232
commit
20494401f8
@ -70,11 +70,10 @@ indicating where the Pod should be scheduled.
|
||||
|
||||
```
|
||||
|
||||
The Scheduler tries to find a node for each Pod, one at a time. Notices pods via watch.
|
||||
- First it applies a set of "predicates" to filter out inappropriate nodes inappropriate nodes. For example, if the PodSpec specifies resource requests, then the scheduler will filter out nodes that don't have at least that much resources available (computed as the capacity of the node minus the sum of the resource requests of the containers that are already running on the node).
|
||||
The Scheduler tries to find a node for each Pod, one at a time.
|
||||
- First it applies a set of "predicates" to filter out inappropriate nodes. For example, if the PodSpec specifies resource requests, then the scheduler will filter out nodes that don't have at least that much resources available (computed as the capacity of the node minus the sum of the resource requests of the containers that are already running on the node).
|
||||
- Second, it applies a set of "priority functions"
|
||||
that rank the nodes that weren't filtered out by the predicate check. For example, it tries to spread Pods across nodes and zones while at the same time favoring the least-loaded nodes (where "load" here is sum of the resource requests of the containers running on the node,
|
||||
divided by the node's capacity).
|
||||
that rank the nodes that weren't filtered out by the predicate check. For example, it tries to spread Pods across nodes and zones while at the same time favoring the least (theoretically) loaded nodes (where "load" - in theory - is measured as the sum of the resource requests of the containers running on the node, divided by the node's capacity).
|
||||
- Finally, the node with the highest priority is chosen (or, if there are multiple such nodes, then one of them is chosen at random). The code for this main scheduling loop is in the function `Schedule()` in [plugin/pkg/scheduler/generic_scheduler.go](http://releases.k8s.io/HEAD/plugin/pkg/scheduler/generic_scheduler.go)
|
||||
|
||||
## Scheduler extensibility
|
||||
|
Loading…
Reference in New Issue
Block a user