You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!-- leave this shortcode in place until the note about EvenPodsSpread is
9
-
obsolete -->
10
7
11
8
<!-- overview -->
12
9
13
10
You can use _topology spread constraints_ to control how {{< glossary_tooltip text="Pods" term_id="Pod" >}} are spread across your cluster among failure-domains such as regions, zones, nodes, and other user-defined topology domains. This can help to achieve high availability as well as efficient resource utilization.
14
11
15
-
{{< note >}}
16
-
In versions of Kubernetes before v1.18, you must enable the `EvenPodsSpread`
17
-
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/) on
18
-
the [API server](/docs/concepts/overview/components/#kube-apiserver) and the
19
-
[scheduler](/docs/reference/command-line-tools-reference/kube-scheduler/) in order to use Pod
20
-
topology spread constraints.
21
-
{{< /note >}}
22
12
23
13
<!-- body -->
24
14
@@ -85,7 +75,7 @@ You can define one or multiple `topologySpreadConstraint` to instruct the kube-s
85
75
It must be greater than zero. Its semantics differs according to the value of `whenUnsatisfiable`:
86
76
- when `whenUnsatisfiable` equals to "DoNotSchedule", `maxSkew` is the maximum
87
77
permitted difference between the number of matching pods in the target
88
-
topology and the global minimum
78
+
topology and the global minimum
89
79
(the minimum number of pods that match the label selector in a topology domain. For example, if you have 3 zones with 0, 2 and 3 matching pods respectively, The global minimum is 0).
90
80
- when `whenUnsatisfiable` equals to "ScheduleAnyway", scheduler gives higher
91
81
precedence to topologies that would help reduce the skew.
@@ -319,21 +309,17 @@ profiles:
319
309
```
320
310
321
311
{{< note >}}
322
-
The score produced by default scheduling constraints might conflict with the
With the `DefaultPodTopologySpread` feature gate, enabled by default, the
334
-
legacy `SelectorSpread` plugin is disabled.
335
-
kube-scheduler uses the following default topology constraints for the
336
-
`PodTopologySpread` plugin configuration:
321
+
If you don't configure any cluster-level default constraints for pod topology spreading,
322
+
then kube-scheduler acts as if you specified the following default topology constraints:
337
323
338
324
```yaml
339
325
defaultConstraints:
@@ -346,7 +332,7 @@ defaultConstraints:
346
332
```
347
333
348
334
Also, the legacy `SelectorSpread` plugin, which provides an equivalent behavior,
349
-
is disabled.
335
+
is disabled by default.
350
336
351
337
{{< note >}}
352
338
If your nodes are not expected to have **both** `kubernetes.io/hostname` and
@@ -392,7 +378,7 @@ for more details.
392
378
393
379
## Known Limitations
394
380
395
-
- There's no guarantee that the constraints remain satisfied when Pods are removed. For example, scaling down a Deployment may result in imbalanced Pods distribution.
381
+
- There's no guarantee that the constraints remain satisfied when Pods are removed. For example, scaling down a Deployment may result in imbalanced Pods distribution.
396
382
You can use [Descheduler](https://github.com/kubernetes-sigs/descheduler) to rebalance the Pods distribution.
397
383
- Pods matched on tainted nodes are respected. See [Issue 80921](https://github.com/kubernetes/kubernetes/issues/80921)
0 commit comments