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
@@ -373,12 +391,12 @@ When you want to disable it, you have to disable it explicitly via the
373
391
{{< /note >}}
374
392
375
393
Kubernetes includes an optional `matchLabelKeys` field for Pod affinity
376
-
or anti-affinity. The field specifies keys for the labels that should match with the incoming Pod's labels,
394
+
or anti-affinity. The field specifies keys for the labels that should match with the incoming Pod's labels,
377
395
when satisfying the Pod (anti)affinity.
378
396
379
-
The keys are used to look up values from the pod labels; those key-value labels are combined
397
+
The keys are used to look up values from the Pod labels; those key-value labels are combined
380
398
(using `AND`) with the match restrictions defined using the `labelSelector` field. The combined
381
-
filtering selects the set of existing pods that will be taken into Pod (anti)affinity calculation.
399
+
filtering selects the set of existing Pods that will be taken into Pod (anti)affinity calculation.
382
400
383
401
{{< caution >}}
384
402
It's not recommended to use `matchLabelKeys` with labels that might be updated directly on pods.
@@ -430,7 +448,7 @@ When you want to disable it, you have to disable it explicitly via the
430
448
{{< /note >}}
431
449
432
450
Kubernetes includes an optional `mismatchLabelKeys` field for Pod affinity
433
-
or anti-affinity. The field specifies keys for the labels that should **not** match with the incoming Pod's labels,
451
+
or anti-affinity. The field specifies keys for the labels that should not match with the incoming Pod's labels,
434
452
when satisfying the Pod (anti)affinity.
435
453
436
454
{{< caution >}}
@@ -454,20 +472,20 @@ spec:
454
472
affinity:
455
473
podAffinity:
456
474
requiredDuringSchedulingIgnoredDuringExecution:
457
-
# ensure that pods associated with this tenant land on the correct node pool
475
+
# ensure that Pods associated with this tenant land on the correct node pool
458
476
- matchLabelKeys:
459
477
- tenant
460
478
topologyKey: node-pool
461
479
podAntiAffinity:
462
480
requiredDuringSchedulingIgnoredDuringExecution:
463
-
# ensure that pods associated with this tenant can't schedule to nodes used for another tenant
481
+
# ensure that Pods associated with this tenant can't schedule to nodes used for another tenant
464
482
- mismatchLabelKeys:
465
483
- tenant # whatever the value of the "tenant" label for this Pod, prevent
466
484
# scheduling to nodes in any pool where any Pod from a different
467
485
# tenant is running.
468
486
labelSelector:
469
487
# We have to have the labelSelector which selects only Pods with the tenant label,
470
-
# otherwise this Pod would have Pods from daemonsets as well, for example,
488
+
# otherwise this Pod would have anti-affinity against Pods from daemonsets as well, for example,
471
489
# which aren't supposed to have the tenant label.
472
490
matchExpressions:
473
491
- key: tenant
@@ -651,10 +669,10 @@ The following operators can only be used with `nodeAffinity`.
651
669
| `Gt` | The field value will be parsed as an integer, and that integer is less than the integer that results from parsing the value of a label named by this selector |
652
670
| `Lt` | The field value will be parsed as an integer, and that integer is greater than the integer that results from parsing the value of a label named by this selector |
653
671
654
-
655
672
{{<note>}}
673
+
656
674
`Gt`and `Lt` operators will not work with non-integer values. If the given value
657
-
doesn't parse as an integer, the pod will fail to get scheduled. Also, `Gt` and `Lt`
675
+
doesn't parse as an integer, the Pod will fail to get scheduled. Also, `Gt` and `Lt`
658
676
are not available for `podAffinity`.
659
677
{{</note>}}
660
678
@@ -666,4 +684,4 @@ are not available for `podAffinity`.
666
684
- Learn about how the [topology manager](/docs/tasks/administer-cluster/topology-manager/) takes part in node-level
667
685
resource allocation decisions.
668
686
- Learn how to use [nodeSelector](/docs/tasks/configure-pod-container/assign-pods-nodes/).
669
-
- Learn how to use [affinity and anti-affinity](/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity/).
687
+
- Learn how to use [affinity and anti-affinity](/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity/).
0 commit comments