Skip to content

Commit 6e10839

Browse files
authored
Merge pull request #5673 from MadhavJivrajani/master
Fix broken links in contributors/devel/sig-scheduling
2 parents fbabf55 + 0e3ac4f commit 6e10839

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

contributors/devel/sig-scheduling/scheduler.md

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -62,29 +62,28 @@ For given pod:
6262

6363
The Scheduler tries to find a node for each Pod, one at a time.
6464
- 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).
65-
- Second, it applies a set of "priority functions"
66-
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).
67-
- 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 [pkg/scheduler/core/generic_scheduler.go](http://releases.k8s.io/HEAD/pkg/scheduler/core/generic_scheduler.go)
65+
- 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 (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).
66+
- 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 [pkg/scheduler/core/generic_scheduler.go](http://releases.k8s.io/HEAD/pkg/scheduler/core/generic_scheduler.go).
6867

6968
### Predicates and priorities policies
7069

71-
Predicates are a set of policies applied one by one to filter out inappropriate nodes.
72-
Priorities are a set of policies applied one by one to rank nodes (that made it through the filter of the predicates).
73-
By default, Kubernetes provides built-in predicates and priorities policies documented in [scheduler_algorithm.md](scheduler_algorithm.md).
74-
The predicates and priorities code are defined in [pkg/scheduler/algorithm/predicates/predicates.go](http://releases.k8s.io/HEAD/pkg/scheduler/algorithm/predicates/predicates.go) and [pkg/scheduler/algorithm/priorities](http://releases.k8s.io/HEAD/pkg/scheduler/algorithm/priorities/) , respectively.
75-
70+
- Predicates are a set of policies applied one by one to filter out inappropriate nodes.
71+
- Priorities are a set of policies applied one by one to rank nodes (that made it through the filter of the predicates).
72+
- By default, Kubernetes provides built-in predicates and priorities policies documented in [scheduler_algorithm.md](scheduler_algorithm.md).
73+
- The predicates and priorities code are defined in [pkg/scheduler/framework/plugins/legacy_registry.go].
7674

7775
## Scheduler extensibility
7876

79-
The scheduler is extensible: the cluster administrator can choose which of the pre-defined
80-
scheduling policies to apply, and can add new ones.
77+
The scheduler is extensible: the cluster administrator can choose which of the pre-defined scheduling policies to apply, and can add new ones.
8178

8279
### Modifying policies
8380

8481
The policies that are applied when scheduling can be chosen in one of two ways.
85-
The default policies used are selected by the functions `defaultPredicates()` and `defaultPriorities()` in
86-
[pkg/scheduler/algorithmprovider/defaults/defaults.go](http://releases.k8s.io/HEAD/pkg/scheduler/algorithmprovider/defaults/defaults.go).
87-
However, the choice of policies can be overridden by passing the command-line flag `--policy-config-file` to the scheduler, pointing to a JSON file specifying which scheduling policies to use. See [examples/scheduler-policy-config.json](https://git.k8s.io/examples/staging/scheduler-policy/scheduler-policy-config.json) for an example
88-
config file. (Note that the config file format is versioned; the API is defined in [pkg/scheduler/api](http://releases.k8s.io/HEAD/pkg/scheduler/api/)).
89-
Thus to add a new scheduling policy, you should modify [pkg/scheduler/algorithm/predicates/predicates.go](http://releases.k8s.io/HEAD/pkg/scheduler/algorithm/predicates/predicates.go) or add to the directory [pkg/scheduler/algorithm/priorities](http://releases.k8s.io/HEAD/pkg/scheduler/algorithm/priorities/), and either register the policy in `defaultPredicates()` or `defaultPriorities()`, or use a policy config file.
90-
82+
The default policies used are selected by the fields `DefaultPredicates` and `DefaultPriorities` in
83+
[pkg/scheduler/framework/plugins/legacy_registry.go]. However, the choice of policies can be overridden by passing the command-line flag `--policy-config-file` to the scheduler, pointing to a JSON file specifying which scheduling policies to use. See [examples/scheduler-policy-config.json](https://git.k8s.io/examples/staging/scheduler-policy/scheduler-policy-config.json) for an example
84+
config file. (Note that the config file format is versioned; the API is defined in [pkg/scheduler/apis](http://releases.k8s.io/HEAD/pkg/scheduler/apis/)).
85+
Thus to add a new scheduling policy, you should:
86+
1. Modify the available predicates or add to the priorities, both which are present in [pkg/scheduler/framework/plugins/legacy_registry.go].
87+
2. Either register the policy in `DefaultPredicates` or `DefaultPriorities` both of which can be found in [pkg/scheduler/framework/plugins/legacy_registry.go], or use a policy config file.
88+
89+
[pkg/scheduler/framework/plugins/legacy_registry.go]: https://releases.k8s.io/HEAD/pkg/scheduler/framework/plugins/legacy_registry.go

contributors/devel/sig-scheduling/scheduler_algorithm.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ The purpose of filtering the nodes is to filter out the nodes that do not meet c
88

99
- `NoDiskConflict`: Evaluate if a pod can fit due to the volumes it requests, and those that are already mounted. Currently supported volumes are: AWS EBS, GCE PD, ISCSI and Ceph RBD. Only Persistent Volume Claims for those supported types are checked. Persistent Volumes added directly to pods are not evaluated and are not constrained by this policy.
1010
- `NoVolumeZoneConflict`: Evaluate if the volumes a pod requests are available on the node, given the Zone restrictions.
11-
- `PodFitsResources`: Check if the free resource (CPU and Memory) meets the requirement of the Pod. The free resource is measured by the capacity minus the sum of requests of all Pods on the node. To learn more about the resource QoS in Kubernetes, please check [QoS proposal](../design-proposals/node/resource-qos.md).
11+
- `PodFitsResources`: Check if the free resource (CPU and Memory) meets the requirement of the Pod. The free resource is measured by the capacity minus the sum of requests of all Pods on the node. To learn more about the resource QoS in Kubernetes, please check [QoS proposal](../../design-proposals/node/resource-qos.md).
1212
- `PodFitsHostPorts`: Check if any HostPort required by the Pod is already occupied on the node.
1313
- `HostName`: Filter out all nodes except the one specified in the PodSpec's NodeName field.
1414
- `MatchNodeSelector`: Check if the labels of the node match the labels specified in the Pod's `nodeSelector` field and, as of Kubernetes v1.2, also match the `nodeAffinity` if present. See [here](https://kubernetes.io/docs/user-guide/node-selection/) for more details on both.
15-
- `MaxEBSVolumeCount`: Ensure that the number of attached ElasticBlockStore volumes does not exceed a maximum value (by default, 39, since Amazon recommends a maximum of 40 with one of those 40 reserved for the root volume -- see [Amazon's documentation](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/volume_limits.html#linux-specific-volume-limits)). The maximum value can be controlled by setting the `KUBE_MAX_PD_VOLS` environment variable.
15+
- `MaxEBSVolumeCount`: Ensure that the number of attached ElasticBlockStore volumes does not exceed a maximum value (by default, 39, since Amazon recommends a maximum of 40 with one of those 40 reserved for the root volume -- see [Amazon's documentation](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/volume_limits.html#linux-specific-volume-limits)). The maximum value can be controlled by setting the `KUBE_MAX_PD_VOLS` environment variable.
1616
- `MaxGCEPDVolumeCount`: Ensure that the number of attached GCE PersistentDisk volumes does not exceed a maximum value (by default, 16, which is the maximum GCE allows -- see [GCE's documentation](https://cloud.google.com/compute/docs/disks/persistent-disks#limits_for_predefined_machine_types)). The maximum value can be controlled by setting the `KUBE_MAX_PD_VOLS` environment variable.
1717
- `CheckNodeMemoryPressure`: Check if a pod can be scheduled on a node reporting memory pressure condition. Currently, no ``BestEffort`` pods should be placed on a node under memory pressure as it gets automatically evicted by kubelet.
1818
- `CheckNodeDiskPressure`: Check if a pod can be scheduled on a node reporting disk pressure condition. Currently, no pods should be placed on a node under disk pressure as it gets automatically evicted by kubelet.
1919

20-
The details of the above predicates can be found in [pkg/scheduler/algorithm/predicates/predicates.go](http://releases.k8s.io/HEAD/pkg/scheduler/algorithm/predicates/predicates.go). All predicates mentioned above can be used in combination to perform a sophisticated filtering policy. Kubernetes uses some, but not all, of these predicates by default. You can see which ones are used by default in [pkg/scheduler/algorithmprovider/defaults/defaults.go](http://releases.k8s.io/HEAD/pkg/scheduler/algorithmprovider/defaults/defaults.go).
20+
The details of the above predicates can be found in [pkg/scheduler/framework/plugins/legacy_registry.go]. All predicates mentioned above can be used in combination to perform a sophisticated filtering policy. Kubernetes uses some, but not all, of these predicates by default. You can see which ones are used by default in [pkg/scheduler/framework/plugins/legacy_registry.go].
2121

2222
## Ranking the nodes
2323

@@ -36,5 +36,6 @@ Currently, Kubernetes scheduler provides some practical priority functions, incl
3636
- `ImageLocalityPriority`: Nodes are prioritized based on locality of images requested by a pod. Nodes with larger size of already-installed packages required by the pod will be preferred over nodes with no already-installed packages required by the pod or a small total size of already-installed packages required by the pod.
3737
- `NodeAffinityPriority`: (Kubernetes v1.2) Implements `preferredDuringSchedulingIgnoredDuringExecution` node affinity; see [here](https://kubernetes.io/docs/user-guide/node-selection/) for more details.
3838

39-
The details of the above priority functions can be found in [pkg/scheduler/algorithm/priorities](http://releases.k8s.io/HEAD/pkg/scheduler/algorithm/priorities/). Kubernetes uses some, but not all, of these priority functions by default. You can see which ones are used by default in [pkg/scheduler/algorithmprovider/defaults/defaults.go](http://releases.k8s.io/HEAD/pkg/scheduler/algorithmprovider/defaults/defaults.go). Similar as predicates, you can combine the above priority functions and assign weight factors (positive number) to them as you want (check [scheduler.md](scheduler.md) for how to customize).
39+
The details of the above priority functions can be found in [pkg/scheduler/framework/plugins/legacy_registry.go]. Kubernetes uses some, but not all, of these priority functions by default. You can see which ones are used by default in [pkg/scheduler/framework/plugins/legacy_registry.go]. Similar as predicates, you can combine the above priority functions and assign weight factors (positive number) to them as you want (check [scheduler.md](scheduler.md) for how to customize).
4040

41+
[pkg/scheduler/framework/plugins/legacy_registry.go]: https://releases.k8s.io/HEAD/pkg/scheduler/framework/plugins/legacy_registry.go

0 commit comments

Comments
 (0)