From 7f52b9eb096442eda6af2055fadc737758e92623 Mon Sep 17 00:00:00 2001 From: Guangya Liu Date: Thu, 27 Apr 2017 00:02:18 +0800 Subject: [PATCH] Added more explanation for nodeAffinity. Explain more for how multiple nodeSelectorTerms and multiple matchExpressions works. Fixed #3345 --- docs/concepts/configuration/assign-pod-node.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/concepts/configuration/assign-pod-node.md b/docs/concepts/configuration/assign-pod-node.md index da96a4d526..0bab16bf12 100644 --- a/docs/concepts/configuration/assign-pod-node.md +++ b/docs/concepts/configuration/assign-pod-node.md @@ -138,6 +138,10 @@ There is no explicit "node anti-affinity" concept, but `NotIn` and `DoesNotExist If you specify both `nodeSelector` and `nodeAffinity`, *both* must be satisfied for the pod to be scheduled onto a candidate node. +If you specify multiple `nodeSelectorTerms` associated with `nodeAffinity` types, then the pod can be scheduled onto a node **if one of** the `nodeSelectorTerms` is satisfied. + +If you specify multiple `matchExpressions` associated with `nodeSelectorTerms`, then the pod can be scheduled onto a node **only if all** `matchExpressions` can be satisfied. + For more information on node affinity, see the design doc [here](https://github.com/kubernetes/kubernetes/blob/{{page.githubbranch}}/docs/design/nodeaffinity.md).