1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-07 09:46:53 +01:00
Files
openshift-docs/modules/nodes-nodes-working-marking.adoc
2020-08-07 16:17:38 -04:00

46 lines
1.2 KiB
Plaintext

// Module included in the following assemblies:
//
// * nodes/nodes-nodes-working.adoc
[id="nodes-nodes-working-marking_{context}"]
= Understanding how to mark nodes as unschedulable or schedulable
By default, healthy nodes with a `Ready` status are
marked as schedulable, meaning that new pods are allowed for placement on the
node. Manually marking a node as unschedulable blocks any new pods from being
scheduled on the node. Existing pods on the node are not affected.
* The following command marks a node or nodes as unschedulable:
+
.Example output
[source,terminal]
----
$ oc adm cordon <node>
----
+
For example:
+
[source,terminal]
----
$ oc adm cordon node1.example.com
----
+
.Example output
[source,terminal]
----
node/node1.example.com cordoned
NAME LABELS STATUS
node1.example.com kubernetes.io/hostname=node1.example.com Ready,SchedulingDisabled
----
* The following command marks a currently unschedulable node or nodes as schedulable:
+
[source,terminal]
----
$ oc adm uncordon <node1>
----
+
Alternatively, instead of specifying specific node names (for example, `<node>`), you can use the `--selector=<node_selector>` option to mark selected
nodes as schedulable or unschedulable.