From bd21c80c3b902c2c82505e91f7005ffac5333544 Mon Sep 17 00:00:00 2001 From: Michael Burke Date: Wed, 3 Feb 2021 11:49:24 -0500 Subject: [PATCH] Highlight relantionship between defaultNodeSelector and pod's nodeSelector --- modules/nodes-scheduler-node-selectors-pod.adoc | 2 ++ nodes/scheduling/nodes-scheduler-default.adoc | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/nodes-scheduler-node-selectors-pod.adoc b/modules/nodes-scheduler-node-selectors-pod.adoc index 03cb25a7f360..dfec96633d0a 100644 --- a/modules/nodes-scheduler-node-selectors-pod.adoc +++ b/modules/nodes-scheduler-node-selectors-pod.adoc @@ -12,6 +12,8 @@ With node selectors, {product-title} schedules the pods on nodes that contain ma To add node selectors to an existing pod, add a node selector to the controlling object for that pod, such as a `ReplicaSet` object, `DaemonSet` object, `StatefulSet` object, `Deployment` object, or `DeploymentConfig` object. Any existing pods under that controlling object are recreated on a node with a matching label. If you are creating a new pod, you can add the node selector directly to the `Pod` spec. +If you use cluster-wide node selectors, when you create a pod in that cluster, {product-title} adds the default node selectors to the pod and schedules the pod on nodes with labels that match the default node selectors and the pod node selectors. + You can add labels to a node or machine config, but the labels will not persist if the node or machine goes down. Adding the label to the machine set ensures that new nodes or machines will have the label. diff --git a/nodes/scheduling/nodes-scheduler-default.adoc b/nodes/scheduling/nodes-scheduler-default.adoc index ba29c6c3e1d4..04e2377acd7a 100644 --- a/nodes/scheduling/nodes-scheduler-default.adoc +++ b/nodes/scheduling/nodes-scheduler-default.adoc @@ -42,7 +42,7 @@ spec: defaultNodeSelector: type=user-node,region=east <2> ---- <1> You can specify the name of a custom scheduler policy file. -<2> Optionally, specify a default node selector to restrict pod placement to specific nodes. +<2> Optional: Specify a default node selector to restrict pod placement to specific nodes. The default node selector is applied to the pods created in all namespaces. Pods can be scheduled on nodes with labels that match the default node selector and any existing pod node selectors. Namespaces having project-wide node selectors are not impacted even if this field is set. // The following include statements pull in the module files that comprise // the assembly. Include any combination of concept, procedure, or reference