Skip to content

Commit 46b8ceb

Browse files
authored
Merge pull request #30404 from kerthcet/feature/add-migration-to-scheduler-v1beta3
add migration guide to scheduler v1beta3
2 parents 1990476 + 74dcb53 commit 46b8ceb

File tree

2 files changed

+10
-119
lines changed

2 files changed

+10
-119
lines changed

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

Lines changed: 7 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ by implementing one or more of these extension points.
2020

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

2726
A minimal configuration looks as follows:
@@ -179,30 +178,6 @@ that are not enabled by default:
179178
volume limits can be satisfied for the node.
180179
Extension points: `filter`.
181180

182-
The following plugins are deprecated and can only be enabled in a `v1beta1`
183-
configuration:
184-
185-
- `NodeResourcesLeastAllocated`: Favors nodes that have a low allocation of
186-
resources.
187-
Extension points: `score`.
188-
- `NodeResourcesMostAllocated`: Favors nodes that have a high allocation of
189-
resources.
190-
Extension points: `score`.
191-
- `RequestedToCapacityRatio`: Favor nodes according to a configured function of
192-
the allocated resources.
193-
Extension points: `score`.
194-
- `NodeLabel`: Filters and / or scores a node according to configured
195-
{{< glossary_tooltip text="label(s)" term_id="label" >}}.
196-
Extension points: `filter`, `score`.
197-
- `ServiceAffinity`: Checks that Pods that belong to a
198-
{{< glossary_tooltip term_id="service" >}} fit in a set of nodes defined by
199-
configured labels. This plugin also favors spreading the Pods belonging to a
200-
Service across nodes.
201-
Extension points: `preFilter`, `filter`, `score`.
202-
- `NodePreferAvoidPods`: Prioritizes nodes according to the node annotation
203-
`scheduler.alpha.kubernetes.io/preferAvoidPods`.
204-
Extension points: `score`.
205-
206181
### Multiple profiles
207182

208183
You can configure `kube-scheduler` to run more than one profile.
@@ -285,7 +260,13 @@ only has one pending pods queue.
285260
* A plugin enabled in a v1beta2 configuration file takes precedence over the default configuration for that plugin.
286261

287262
* Invalid `host` or `port` configured for scheduler healthz and metrics bind address will cause validation failure.
263+
{{% /tab %}}
288264

265+
{{% tab name="v1beta2 → v1beta3" %}}
266+
* Three plugins' weight are increased by default:
267+
* `InterPodAffinity` from 1 to 2
268+
* `NodeAffinity` from 1 to 2
269+
* `TaintToleration` from 1 to 3
289270
{{% /tab %}}
290271
{{< /tabs >}}
291272

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

Lines changed: 3 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -6,104 +6,14 @@ weight: 10
66

77
<!-- overview -->
88

9-
A scheduling Policy can be used to specify the *predicates* and *priorities*
10-
that the {{< glossary_tooltip text="kube-scheduler" term_id="kube-scheduler" >}}
11-
runs to [filter and score nodes](/docs/concepts/scheduling-eviction/kube-scheduler/#kube-scheduler-implementation),
12-
respectively.
9+
In Kubernetes versions before v1.23, a scheduling policy can be used to specify the *predicates* and *priorities* process. For example, you can set a scheduling policy by
10+
running `kube-scheduler --policy-config-file <filename>` or `kube-scheduler --policy-configmap <ConfigMap>`.
1311

14-
You can set a scheduling policy by running
15-
`kube-scheduler --policy-config-file <filename>` or
16-
`kube-scheduler --policy-configmap <ConfigMap>`
17-
and using the [Policy type](/docs/reference/config-api/kube-scheduler-policy-config.v1/).
18-
19-
<!-- body -->
20-
21-
## Predicates
22-
23-
The following *predicates* implement filtering:
24-
25-
- `PodFitsHostPorts`: Checks if a Node has free ports (the network protocol kind)
26-
for the Pod ports the Pod is requesting.
27-
28-
- `PodFitsHost`: Checks if a Pod specifies a specific Node by its hostname.
29-
30-
- `PodFitsResources`: Checks if the Node has free resources (eg, CPU and Memory)
31-
to meet the requirement of the Pod.
32-
33-
- `MatchNodeSelector`: Checks if a Pod's Node {{< glossary_tooltip term_id="selector" >}}
34-
matches the Node's {{< glossary_tooltip text="label(s)" term_id="label" >}}.
35-
36-
- `NoVolumeZoneConflict`: Evaluate if the {{< glossary_tooltip text="Volumes" term_id="volume" >}}
37-
that a Pod requests are available on the Node, given the failure zone restrictions for
38-
that storage.
39-
40-
- `NoDiskConflict`: Evaluates if a Pod can fit on a Node due to the volumes it requests,
41-
and those that are already mounted.
42-
43-
- `MaxCSIVolumeCount`: Decides how many {{< glossary_tooltip text="CSI" term_id="csi" >}}
44-
volumes should be attached, and whether that's over a configured limit.
45-
46-
- `PodToleratesNodeTaints`: checks if a Pod's {{< glossary_tooltip text="tolerations" term_id="toleration" >}}
47-
can tolerate the Node's {{< glossary_tooltip text="taints" term_id="taint" >}}.
48-
49-
- `CheckVolumeBinding`: Evaluates if a Pod can fit due to the volumes it requests.
50-
This applies for both bound and unbound
51-
{{< glossary_tooltip text="PVCs" term_id="persistent-volume-claim" >}}.
52-
53-
## Priorities
54-
55-
The following *priorities* implement scoring:
56-
57-
- `SelectorSpreadPriority`: Spreads Pods across hosts, considering Pods that
58-
belong to the same {{< glossary_tooltip text="Service" term_id="service" >}},
59-
{{< glossary_tooltip term_id="statefulset" >}} or
60-
{{< glossary_tooltip term_id="replica-set" >}}.
61-
62-
- `InterPodAffinityPriority`: Implements preferred
63-
[inter pod affininity and antiaffinity](/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity).
64-
65-
- `LeastRequestedPriority`: Favors nodes with fewer requested resources. In other
66-
words, the more Pods that are placed on a Node, and the more resources those
67-
Pods use, the lower the ranking this policy will give.
68-
69-
- `MostRequestedPriority`: Favors nodes with most requested resources. This policy
70-
will fit the scheduled Pods onto the smallest number of Nodes needed to run your
71-
overall set of workloads.
72-
73-
- `RequestedToCapacityRatioPriority`: Creates a requestedToCapacity based ResourceAllocationPriority using default resource scoring function shape.
74-
75-
- `BalancedResourceAllocation`: Favors nodes with balanced resource usage.
76-
77-
- `NodePreferAvoidPodsPriority`: Prioritizes nodes according to the node annotation
78-
`scheduler.alpha.kubernetes.io/preferAvoidPods`. You can use this to hint that
79-
two different Pods shouldn't run on the same Node.
80-
81-
- `NodeAffinityPriority`: Prioritizes nodes according to node affinity scheduling
82-
preferences indicated in PreferredDuringSchedulingIgnoredDuringExecution.
83-
You can read more about this in [Assigning Pods to Nodes](/docs/concepts/scheduling-eviction/assign-pod-node/).
84-
85-
- `TaintTolerationPriority`: Prepares the priority list for all the nodes, based on
86-
the number of intolerable taints on the node. This policy adjusts a node's rank
87-
taking that list into account.
88-
89-
- `ImageLocalityPriority`: Favors nodes that already have the
90-
{{< glossary_tooltip text="container images" term_id="image" >}} for that
91-
Pod cached locally.
92-
93-
- `ServiceSpreadingPriority`: For a given Service, this policy aims to make sure that
94-
the Pods for the Service run on different nodes. It favours scheduling onto nodes
95-
that don't have Pods for the service already assigned there. The overall outcome is
96-
that the Service becomes more resilient to a single Node failure.
97-
98-
- `EqualPriority`: Gives an equal weight of one to all nodes.
99-
100-
- `EvenPodsSpreadPriority`: Implements preferred
101-
[pod topology spread constraints](/docs/concepts/workloads/pods/pod-topology-spread-constraints/).
12+
This scheduling policy is not supported since Kubernetes v1.23. Associated flags `policy-config-file`, `policy-configmap`, `policy-configmap-namespace` and `use-legacy-policy-config` are also not supported. Instead, use the [Scheduler Configuration](/docs/reference/scheduling/config/) to achieve similar behavior.
10213

10314
## {{% heading "whatsnext" %}}
10415

10516
* Learn about [scheduling](/docs/concepts/scheduling-eviction/kube-scheduler/)
10617
* Learn about [kube-scheduler Configuration](/docs/reference/scheduling/config/)
10718
* Read the [kube-scheduler configuration reference (v1beta2)](/docs/reference/config-api/kube-scheduler-config.v1beta2)
10819
* Read the [kube-scheduler Policy reference (v1)](/docs/reference/config-api/kube-scheduler-policy-config.v1/)
109-

0 commit comments

Comments
 (0)