mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-07 09:46:53 +01:00
47 lines
1.3 KiB
Plaintext
47 lines
1.3 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * nodes/nodes-nodes-working.adoc
|
|
|
|
:_mod-docs-content-type: CONCEPT
|
|
[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, which means that you can place new pods 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.
|