Update index.md

This commit is contained in:
David Oppenheimer 2016-03-17 00:35:35 -07:00
parent 998837942d
commit dd298f4f32
1 changed files with 3 additions and 1 deletions

View File

@ -76,6 +76,8 @@ This node affinity rule says the pod can only be placed on a node with a label w
among nodes that meet that criteria, nodes with a label whose key is `foo` and whose
value is `bar` should be preferred.
You can see the operator `In` being used in the example. The new node affinity syntax supports the following operators: `In`, `NotIn`, `Exists`, `DoesNotExist`, `Gt`, `Lt`.
If you specify both `nodeSelector` and `nodeAffinity`, *both* must be satisfied for the pod
to be scheduled onto a candidate node.
@ -91,4 +93,4 @@ with a standard set of labels. As of Kubernetes v1.2 these labels are
### Conclusion
While this example only covered one node, you can attach labels to as many nodes as you want. Then when you schedule a pod with a nodeSelector, it can be scheduled on any of the nodes that satisfy that nodeSelector. Be careful that it will match at least one node, however, because if it doesn't the pod won't be scheduled at all.
While this example only covered one node, you can attach labels to as many nodes as you want. Then when you schedule a pod with a nodeSelector, it can be scheduled on any of the nodes that satisfy that nodeSelector. Be careful that it will match at least one node, however, because if it doesn't the pod won't be scheduled at all.