From 3132fbe4f07584b5f010ef893ac8c7617a49cae8 Mon Sep 17 00:00:00 2001 From: Remo Andreoli Date: Fri, 24 Jun 2022 03:11:19 +0200 Subject: [PATCH] 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 --- .../docs/concepts/scheduling-eviction/assign-pod-node.md | 4 ++-- .../en/examples/pods/pod-with-affinity-anti-affinity.yaml | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/content/en/docs/concepts/scheduling-eviction/assign-pod-node.md b/content/en/docs/concepts/scheduling-eviction/assign-pod-node.md index 8d3cc1831c..db9f1d900d 100644 --- a/content/en/docs/concepts/scheduling-eviction/assign-pod-node.md +++ b/content/en/docs/concepts/scheduling-eviction/assign-pod-node.md @@ -124,8 +124,8 @@ For example, consider the following Pod spec: In this example, the following rules apply: - * The node *must* have a label with the key `kubernetes.io/os` and - the value `linux`. + * The node *must* have a label with the key `topology.kubernetes.io/zone` and + 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 value `another-node-label-value`. diff --git a/content/en/examples/pods/pod-with-affinity-anti-affinity.yaml b/content/en/examples/pods/pod-with-affinity-anti-affinity.yaml index a7d14b2d6f..5dcc7693b6 100644 --- a/content/en/examples/pods/pod-with-affinity-anti-affinity.yaml +++ b/content/en/examples/pods/pod-with-affinity-anti-affinity.yaml @@ -8,10 +8,11 @@ spec: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - - key: kubernetes.io/os + - key: topology.kubernetes.io/zone operator: In values: - - linux + - antarctica-east1 + - antarctica-west1 preferredDuringSchedulingIgnoredDuringExecution: - weight: 1 preference: @@ -29,4 +30,4 @@ spec: - key-2 containers: - name: with-node-affinity - image: k8s.gcr.io/pause:2.0 \ No newline at end of file + image: k8s.gcr.io/pause:2.0