Skip to content

Commit ff7a649

Browse files
authored
Merge pull request #30151 from kerthcet/feature/add-introduce-to-scheduler-v1beta3
add introductions for scheduler component config api migrations
2 parents 6119f08 + c0175c5 commit ff7a649

File tree

1 file changed

+44
-11
lines changed
  • content/en/docs/reference/scheduling

1 file changed

+44
-11
lines changed

content/en/docs/reference/scheduling/config.md

Lines changed: 44 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ by implementing one or more of these extension points.
2121
You can specify scheduling profiles by running `kube-scheduler --config <filename>`,
2222
using the
2323
KubeSchedulerConfiguration ([v1beta1](/docs/reference/config-api/kube-scheduler-config.v1beta1/)
24-
or [v1beta2](/docs/reference/config-api/kube-scheduler-config.v1beta2/))
24+
or [v1beta2](/docs/reference/config-api/kube-scheduler-config.v1beta2/))
2525
struct.
2626

2727
A minimal configuration looks as follows:
@@ -89,7 +89,7 @@ profiles:
8989
- plugins:
9090
score:
9191
disabled:
92-
- name: NodeResourcesLeastAllocated
92+
- name: PodTopologySpread
9393
enabled:
9494
- name: MyCustomPluginA
9595
weight: 2
@@ -100,7 +100,7 @@ profiles:
100100
You can use `*` as name in the disabled array to disable all default plugins
101101
for that extension point. This can also be used to rearrange plugins order, if
102102
desired.
103-
103+
104104
### Scheduling plugins
105105

106106
The following plugins, enabled by default, implement one or more of these
@@ -116,10 +116,6 @@ extension points:
116116
Extension points: `filter`.
117117
- `NodePorts`: Checks if a node has free ports for the requested Pod ports.
118118
Extension points: `preFilter`, `filter`.
119-
- `NodePreferAvoidPods`: Scores nodes according to the node
120-
{{< glossary_tooltip text="annotation" term_id="annotation" >}}
121-
`scheduler.alpha.kubernetes.io/preferAvoidPods`.
122-
Extension points: `score`.
123119
- `NodeAffinity`: Implements
124120
[node selectors](/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector)
125121
and [node affinity](/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity).
@@ -170,7 +166,7 @@ extension points:
170166
Extension points: `bind`.
171167
- `DefaultPreemption`: Provides the default preemption mechanism.
172168
Extension points: `postFilter`.
173-
169+
174170
You can also enable the following plugins, through the component config APIs,
175171
that are not enabled by default:
176172

@@ -182,7 +178,7 @@ that are not enabled by default:
182178
- `CinderLimits`: Checks that [OpenStack Cinder](https://docs.openstack.org/cinder/)
183179
volume limits can be satisfied for the node.
184180
Extension points: `filter`.
185-
181+
186182
The following plugins are deprecated and can only be enabled in a `v1beta1`
187183
configuration:
188184

@@ -206,7 +202,7 @@ configuration:
206202
- `NodePreferAvoidPods`: Prioritizes nodes according to the node annotation
207203
`scheduler.alpha.kubernetes.io/preferAvoidPods`.
208204
Extension points: `score`.
209-
205+
210206
### Multiple profiles
211207

212208
You can configure `kube-scheduler` to run more than one profile.
@@ -255,10 +251,47 @@ the same configuration parameters (if applicable). This is because the scheduler
255251
only has one pending pods queue.
256252
{{< /note >}}
257253

254+
## Scheduler configuration migrations
255+
256+
{{< tabs name="tab_with_md" >}}
257+
{{% tab name="v1beta1 → v1beta2" %}}
258+
* With the v1beta2 configuration version, you can use a new score extension for the
259+
`NodeResourcesFit` plugin.
260+
The new extension combines the functionalities of the `NodeResourcesLeastAllocated`,
261+
`NodeResourcesMostAllocated` and `RequestedToCapacityRatio` plugins.
262+
For example, if you previously used the `NodeResourcesMostAllocated` plugin, you
263+
would instead use `NodeResourcesFit` (enabled by default) and add a `pluginConfig`
264+
with a `scoreStrategy` that is similar to:
265+
```yaml
266+
apiVersion: kubescheduler.config.k8s.io/v1beta2
267+
kind: KubeSchedulerConfiguration
268+
profiles:
269+
- pluginConfig:
270+
- args:
271+
scoringStrategy:
272+
resources:
273+
- name: cpu
274+
weight: 1
275+
type: MostAllocated
276+
name: NodeResourcesFit
277+
```
278+
279+
* The scheduler plugin `NodeLabel` is deprecated; instead, use the [`NodeAffinity`](/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) plugin (enabled by default) to achieve similar behavior.
280+
281+
* The scheduler plugin `ServiceAffinity` is deprecated; instead, use the [`InterPodAffinity`](/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity) plugin (enabled by default) to achieve similar behavior.
282+
283+
* The scheduler plugin `NodePreferAvoidPods` is deprecated; instead, use [node taints](/docs/concepts/scheduling-eviction/taint-and-toleration/) to achieve similar behavior.
284+
285+
* A plugin enabled in a v1beta2 configuration file takes precedence over the default configuration for that plugin.
286+
287+
* Invalid `host` or `port` configured for scheduler healthz and metrics bind address will cause validation failure.
288+
289+
{{% /tab %}}
290+
{{< /tabs >}}
291+
258292
## {{% heading "whatsnext" %}}
259293

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

0 commit comments

Comments
 (0)