mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
Merge pull request #36840 from openshift-cherrypick-robot/cherry-pick-36836-to-enterprise-4.9
[enterprise-4.9] BZ-2004834: Updating recommendation and example for default node sele…
This commit is contained in:
@@ -41,7 +41,7 @@ $ oc get nodes
|
||||
====
|
||||
If the default node selector key conflicts with the key of a pod's label, then the default node selector is not applied.
|
||||
|
||||
However, do not set a default node selector that might cause a pod to become unschedulable. For example, setting the default node selector to a specific node role, such as `node-role.kubernetes.io/infra=""`, when a pod's label is set to a different node role, such as `node-role.kubernetes.io/master=""`, can cause the pod to become unschedulable. For this reason, it is not recommended to set the default node selector to specific node roles.
|
||||
However, do not set a default node selector that might cause a pod to become unschedulable. For example, setting the default node selector to a specific node role, such as `node-role.kubernetes.io/infra=""`, when a pod's label is set to a different node role, such as `node-role.kubernetes.io/master=""`, can cause the pod to become unschedulable. For this reason, use caution when setting the default node selector to specific node roles.
|
||||
|
||||
You can alternatively use a project node selector to avoid cluster-wide node selector key conflicts.
|
||||
====
|
||||
@@ -63,10 +63,10 @@ metadata:
|
||||
name: cluster
|
||||
...
|
||||
spec:
|
||||
defaultNodeSelector: node-role.kubernetes.io/app= <1>
|
||||
defaultNodeSelector: topology.kubernetes.io/zone=us-east-1 <1>
|
||||
...
|
||||
----
|
||||
<1> This example node selector deploys pods on app nodes by default.
|
||||
<1> This example node selector deploys pods on nodes in the `us-east-1` zone by default.
|
||||
|
||||
.. Save the file to apply the changes.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user