Skip to content

Commit

Permalink
add introductions for scheduler component config api migrations
Browse files Browse the repository at this point in the history
Signed-off-by: kerthcet <kerthcet@gmail.com>
  • Loading branch information
kerthcet committed Oct 20, 2021
1 parent bbd7abf commit ee4b985
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 36 deletions.
2 changes: 1 addition & 1 deletion api-ref-generator
Submodule api-ref-generator updated 33 files
+1 −1 Makefile
+4 −7 gen-apidocs/config/config.yaml
+1 −1 gen-apidocs/config/v1_19/config.yaml
+1 −1 gen-apidocs/config/v1_20/config.yaml
+0 −108,928 gen-apidocs/config/v1_20/swagger.json
+1 −1 gen-apidocs/config/v1_21/config.yaml
+0 −8 gen-apidocs/generators/api/types.go
+0 −2 gen-compdocs/generators/doc.go
+9 −25 gen-compdocs/generators/gen_kube_docs.go
+29 −32 gen-compdocs/go.mod
+30 −536 gen-compdocs/go.sum
+1 −1 gen-kubectldocs/generators/gen.go
+1 −1 gen-kubectldocs/generators/read_cmd.go
+0 −4 gen-kubectldocs/generators/v1_21/static_includes/_app_management.md
+0 −11 gen-kubectldocs/generators/v1_21/static_includes/_getting_started.md
+0 −8 gen-kubectldocs/generators/v1_21/static_includes/_working_with_apps.md
+0 −58 gen-kubectldocs/generators/v1_21/toc.yaml
+0 −4 gen-kubectldocs/generators/v1_22/static_includes/_app_management.md
+0 −11 gen-kubectldocs/generators/v1_22/static_includes/_getting_started.md
+0 −8 gen-kubectldocs/generators/v1_22/static_includes/_working_with_apps.md
+0 −58 gen-kubectldocs/generators/v1_22/toc.yaml
+0 −28 gen-kubectldocs/go.mod
+0 −1,121 gen-kubectldocs/go.sum
+9 −13 genref/config.yaml
+21 −22 genref/go.mod
+224 −276 genref/go.sum
+1 −1 genref/output/html/kubeadm-config.v1beta1.html
+1 −1 genref/output/html/kubeadm-config.v1beta2.html
+0 −438 genref/output/md/apiserver-config.v1alpha1.md
+217 −79 genref/output/md/kube-scheduler-config.v1beta1.md
+260 −276 genref/output/md/kubeadm-config.v1beta1.md
+290 −270 genref/output/md/kubeadm-config.v1beta2.md
+0 −1,535 genref/output/md/kubeadm-config.v1beta3.md
59 changes: 25 additions & 34 deletions content/en/docs/reference/scheduling/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ by implementing one or more of these extension points.

You can specify scheduling profiles by running `kube-scheduler --config <filename>`,
using the
KubeSchedulerConfiguration ([v1beta1](/docs/reference/config-api/kube-scheduler-config.v1beta1/)
or [v1beta2](/docs/reference/config-api/kube-scheduler-config.v1beta2/))
KubeSchedulerConfiguration ([v1beta2](/docs/reference/config-api/kube-scheduler-config.v1beta2/))
struct.

A minimal configuration looks as follows:
Expand Down Expand Up @@ -89,7 +88,7 @@ profiles:
- plugins:
score:
disabled:
- name: NodeResourcesLeastAllocated
- name: PodTopologySpread
enabled:
- name: MyCustomPluginA
weight: 2
Expand All @@ -100,7 +99,7 @@ profiles:
You can use `*` as name in the disabled array to disable all default plugins
for that extension point. This can also be used to rearrange plugins order, if
desired.

### Scheduling plugins

The following plugins, enabled by default, implement one or more of these
Expand All @@ -116,10 +115,6 @@ extension points:
Extension points: `filter`.
- `NodePorts`: Checks if a node has free ports for the requested Pod ports.
Extension points: `preFilter`, `filter`.
- `NodePreferAvoidPods`: Scores nodes according to the node
{{< glossary_tooltip text="annotation" term_id="annotation" >}}
`scheduler.alpha.kubernetes.io/preferAvoidPods`.
Extension points: `score`.
- `NodeAffinity`: Implements
[node selectors](/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector)
and [node affinity](/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity).
Expand Down Expand Up @@ -170,7 +165,7 @@ extension points:
Extension points: `bind`.
- `DefaultPreemption`: Provides the default preemption mechanism.
Extension points: `postFilter`.

You can also enable the following plugins, through the component config APIs,
that are not enabled by default:

Expand All @@ -182,31 +177,7 @@ that are not enabled by default:
- `CinderLimits`: Checks that [OpenStack Cinder](https://docs.openstack.org/cinder/)
volume limits can be satisfied for the node.
Extension points: `filter`.

The following plugins are deprecated and can only be enabled in a `v1beta1`
configuration:

- `NodeResourcesLeastAllocated`: Favors nodes that have a low allocation of
resources.
Extension points: `score`.
- `NodeResourcesMostAllocated`: Favors nodes that have a high allocation of
resources.
Extension points: `score`.
- `RequestedToCapacityRatio`: Favor nodes according to a configured function of
the allocated resources.
Extension points: `score`.
- `NodeLabel`: Filters and / or scores a node according to configured
{{< glossary_tooltip text="label(s)" term_id="label" >}}.
Extension points: `filter`, `score`.
- `ServiceAffinity`: Checks that Pods that belong to a
{{< glossary_tooltip term_id="service" >}} fit in a set of nodes defined by
configured labels. This plugin also favors spreading the Pods belonging to a
Service across nodes.
Extension points: `preFilter`, `filter`, `score`.
- `NodePreferAvoidPods`: Prioritizes nodes according to the node annotation
`scheduler.alpha.kubernetes.io/preferAvoidPods`.
Extension points: `score`.

### Multiple profiles

You can configure `kube-scheduler` to run more than one profile.
Expand Down Expand Up @@ -255,10 +226,30 @@ the same configuration parameters (if applicable). This is because the scheduler
only has one pending pods queue.
{{< /note >}}

## Migration introductions between api versions

### v1beta2 -> v1beta3
* Some plugins' weight has been modified for user preferences:
* `InterPodAffinity` to 2
* `NodeAffinity` to 2
* `TaintToleration` to 3
* Support for configuration file version `v1beta1` is removed.
* Scheduler plugin `ServiceAffinity` is removed.
* The legacy scheduler policy config is removed, the associated flags `policy-config-file`, `policy-configmap`, `policy-configmap-namespace` and `use-legacy-policy-config` are also removed.

### v1beta1 -> v1beta2
* A new score extension for `NodeResourcesFit` plugin is introduced, it merges the functionalities of `NodeResourcesLeastAllocated`, `NodeResourcesMostAllocated` and `RequestedToCapacityRatio` plugins, which are marked as deprecated is v1beta2. In v1beta1, the three plugins can still be used but not at the same time with the score extension of `NodeResourcesFit`.
* Scheduler plugin `NodeLabel` is deprecated, it's only configurable through the scheduler policy API and v1beta1 component config API. It's recommended to use `NodeAffinity` plugin instead.
* Scheduler plugin `ServiceAffinity` is deprecated, it's only configurable through the scheduler policy API and v1beta1 component config API. It's recommended to use `InterPodAffinity` plugin instead.
* Scheduler plugin `NodePreferAvoidPods` is deprecated, it's only configurable through the scheduler policy API and v1beta1 component config API. It's recommended to use node taints instead.
* A plugin enabled in a v1beta2 configuration file takes precedence over the default configuration for that plugin. This simplifies enabling default plugins with custom configuration without the necessary to explicitly disable those default plugins.
* New parameter `defaultingType` added for `PodTopologySpread` plugin allowing to use k8s defined or user provided default constraints.
* Add pre-checks for scheduler healthz and metrics bind address.
* The deprecated CLI flags `--hard-pod-affinity-symmetric-weight`, `--algorithm-provider` and `--scheduler-name` have been removed from kube-scheduler. Use `ComponentConfig` instead to configure those parameters.

## {{% heading "whatsnext" %}}

* Read the [kube-scheduler reference](/docs/reference/command-line-tools-reference/kube-scheduler/)
* Learn about [scheduling](/docs/concepts/scheduling-eviction/kube-scheduler/)
* Read the [kube-scheduler configuration (v1beta1)](/docs/reference/config-api/kube-scheduler-config.v1beta1/) reference
* Read the [kube-scheduler configuration (v1beta2)](/docs/reference/config-api/kube-scheduler-config.v1beta2/) reference

0 comments on commit ee4b985

Please sign in to comment.