Fix wrong label key in scheduling example (#32646)

* Fixed deprecated comment in scheduling-eviction/assign-pod-node.md regarding example pods/pod-with-affinity-anti-affinity.yaml

* Changed the example to a more appropriate one
This commit is contained in:
Remo Andreoli
2022-06-24 03:11:19 +02:00
committed by GitHub
parent 3cfe4102b7
commit 3132fbe4f0
2 changed files with 6 additions and 5 deletions
@@ -124,8 +124,8 @@ For example, consider the following Pod spec:
In this example, the following rules apply: In this example, the following rules apply:
* The node *must* have a label with the key `kubernetes.io/os` and * The node *must* have a label with the key `topology.kubernetes.io/zone` and
the value `linux`. the value of that label *must* be either `antarctica-east1` or `antarctica-west1`.
* The node *preferably* has a label with the key `another-node-label-key` and * The node *preferably* has a label with the key `another-node-label-key` and
the value `another-node-label-value`. the value `another-node-label-value`.
@@ -8,10 +8,11 @@ spec:
requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms: nodeSelectorTerms:
- matchExpressions: - matchExpressions:
- key: kubernetes.io/os - key: topology.kubernetes.io/zone
operator: In operator: In
values: values:
- linux - antarctica-east1
- antarctica-west1
preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1 - weight: 1
preference: preference:
@@ -29,4 +30,4 @@ spec:
- key-2 - key-2
containers: containers:
- name: with-node-affinity - name: with-node-affinity
image: k8s.gcr.io/pause:2.0 image: k8s.gcr.io/pause:2.0