From 6e92a7032a641fae89da8a76edae4bd3be4456f7 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Mon, 20 Aug 2018 12:55:58 -0700 Subject: [PATCH] assign-pod-node: pod affinity can't apply to all namespaces (#9876) See kubernetes/kubernetes#67475 --- content/en/docs/concepts/configuration/assign-pod-node.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/content/en/docs/concepts/configuration/assign-pod-node.md b/content/en/docs/concepts/configuration/assign-pod-node.md index ce6be282eb8d3..b7f88ffbb4588 100644 --- a/content/en/docs/concepts/configuration/assign-pod-node.md +++ b/content/en/docs/concepts/configuration/assign-pod-node.md @@ -167,7 +167,7 @@ Inter-pod affinity and anti-affinity were introduced in Kubernetes 1.4. Inter-pod affinity and anti-affinity allow you to constrain which nodes your pod is eligible to be scheduled *based on labels on pods that are already running on the node* rather than based on labels on nodes. The rules are of the form "this pod should (or, in the case of anti-affinity, should not) run in an X if that X is already running one or more pods that meet rule Y". Y is expressed -as a LabelSelector with an associated list of namespaces (or "all" namespaces); unlike nodes, because pods are namespaced +as a LabelSelector with an associated list of namespaces; unlike nodes, because pods are namespaced (and therefore the labels on pods are implicitly namespaced), a label selector over pod labels must specify which namespaces the selector should apply to. Conceptually X is a topology domain like node, rack, cloud provider zone, cloud provider region, etc. You express it using a `topologyKey` which is the @@ -224,8 +224,7 @@ empty `topologyKey` is not allowed. In addition to `labelSelector` and `topologyKey`, you can optionally specify a list `namespaces` of namespaces which the `labelSelector` should match against (this goes at the same level of the definition as `labelSelector` and `topologyKey`). -If omitted, it defaults to the namespace of the pod where the affinity/anti-affinity definition appears. -If defined but empty, it means "all namespaces". +If omitted or empty, it defaults to the namespace of the pod where the affinity/anti-affinity definition appears. All `matchExpressions` associated with `requiredDuringSchedulingIgnoredDuringExecution` affinity and anti-affinity must be satisfied for the pod to be scheduled onto a node.