diff --git a/modules/eco-resuming-node-maintenance-cli.adoc b/modules/eco-resuming-node-maintenance-cli.adoc deleted file mode 100644 index b1ddaffef9..0000000000 --- a/modules/eco-resuming-node-maintenance-cli.adoc +++ /dev/null @@ -1,18 +0,0 @@ -// Module included in the following assemblies: -// -//nodes/nodes/eco-node-maintenance-operator.adoc - -:_content-type: PROCEDURE -[id="eco-resuming-node-maintenance-cli_{context}"] -= Resuming a node from maintenance mode in the CLI - -Resume a node from maintenance mode by making it schedulable again. - -.Procedure - -* Mark the node as schedulable. You can then resume scheduling new workloads on the node. -+ -[source,terminal] ----- -$ oc adm uncordon ----- diff --git a/modules/eco-resuming-node-from-maintenance-mode-with-cr.adoc b/modules/eco-resuming-node-maintenance-cr-cli.adoc similarity index 91% rename from modules/eco-resuming-node-from-maintenance-mode-with-cr.adoc rename to modules/eco-resuming-node-maintenance-cr-cli.adoc index 11122cee54..ae50931f12 100644 --- a/modules/eco-resuming-node-from-maintenance-mode-with-cr.adoc +++ b/modules/eco-resuming-node-maintenance-cr-cli.adoc @@ -4,7 +4,7 @@ :_content-type: PROCEDURE [id="eco-resuming-node-from-maintenance-mode-with-cr_{context}"] -= Resuming a node from maintenance mode with the NodeMaintenance CR += Resuming a node from maintenance mode by using the CLI You can resume a node from maintenance mode that was initiated with a `NodeMaintenance` CR by deleting the `NodeMaintenance` CR. diff --git a/modules/eco-resuming-node-maintenance-cr-web-console.adoc b/modules/eco-resuming-node-maintenance-cr-web-console.adoc new file mode 100644 index 0000000000..c57676a719 --- /dev/null +++ b/modules/eco-resuming-node-maintenance-cr-web-console.adoc @@ -0,0 +1,30 @@ +// Module included in the following assemblies: +// +//nodes/nodes/eco-node-maintenance-operator.adoc + +:_content-type: PROCEDURE +[id="eco-resuming-node-maintenance-web-console_{context}"] += Resuming a node from maintenance mode by using the web console + +To resume a node from maintenance mode, you can delete a `NodeMaintenance` custom resource (CR) by using the web console. + +.Prerequisites + +* Log in as a user with `cluster-admin` privileges. +* Install the Node Maintenance Operator from the *OperatorHub*. + +.Procedure + +. From the *Administrator* perspective in the web console, navigate to *Operators* → *Installed Operators*. + +. Select the Node Maintenance Operator from the list of Operators. + +. In the *Node Maintenance* tab, select the `NodeMaintenance` CR that you want to delete. + +. Click the Options menu {kebab} at the end of the node and select *Delete NodeMaintenance*. + +.Verification + +. In the {product-title} console, click *Compute → Nodes*. + +. Inspect the `Status` column of the node for which you deleted the `NodeMaintenance` CR and verify that its status is `Ready`. \ No newline at end of file diff --git a/modules/eco-setting-node-maintenance-cli.adoc b/modules/eco-setting-node-maintenance-cli.adoc deleted file mode 100644 index f18be7c6a8..0000000000 --- a/modules/eco-setting-node-maintenance-cli.adoc +++ /dev/null @@ -1,31 +0,0 @@ -// Module included in the following assemblies: -// -//nodes/nodes/eco-node-maintenance-operator.adoc - -:_content-type: PROCEDURE -[id="eco-setting-node-maintenance-cli_{context}"] -= Setting a node to maintenance mode in the CLI - -Set a node to maintenance mode by marking it as unschedulable and using the `oc adm drain` command to evict or delete pods from the node. - -.Procedure - -. Mark the node as unschedulable. The node status changes to `NotReady,SchedulingDisabled`. -+ -[source,terminal] ----- -$ oc adm cordon ----- - -. Drain the node in preparation for maintenance. -+ -[source,terminal] ----- -$ oc adm drain --delete-emptydir-data --ignore-daemonsets=true --force ----- - -* The `--delete-emptydir-data` flag removes any pods on the node that use `emptyDir` volumes. Data in these volumes is ephemeral and is safe to be deleted after termination. - -* The `--ignore-daemonsets=true` flag ensures that daemon sets are ignored and pod eviction can continue successfully. - -* The `--force` flag is required to delete pods that are not managed by a replica set or daemon set controller. diff --git a/modules/eco-setting-node-to-maintenance-mode-with-cr.adoc b/modules/eco-setting-node-maintenance-cr-cli.adoc similarity index 74% rename from modules/eco-setting-node-to-maintenance-mode-with-cr.adoc rename to modules/eco-setting-node-maintenance-cr-cli.adoc index cd22c11e31..a252aa3704 100644 --- a/modules/eco-setting-node-to-maintenance-mode-with-cr.adoc +++ b/modules/eco-setting-node-maintenance-cr-cli.adoc @@ -3,8 +3,8 @@ //nodes/nodes/eco-node-maintenance-operator.adoc :_content-type: PROCEDURE -[id="eco-setting-node-to-maintenance-mode-with-cr_{context}"] -= Setting a node to maintenance mode with a NodeMaintenance CR +[id="eco-setting-node-maintenance-cr-cli_{context}"] += Setting a node to maintenance mode by using the CLI You can put a node into maintenance mode with a `NodeMaintenance` custom resource (CR). When you apply a `NodeMaintenance` CR, all allowed pods are evicted and the node is rendered unschedulable. Evicted pods are queued to be moved to another node in the cluster. @@ -15,21 +15,21 @@ You can put a node into maintenance mode with a `NodeMaintenance` custom resourc .Procedure -. Create the following node maintenance CR, and save the file as `nodemaintenance-cr.yaml`: +. Create the following `NodeMaintenance` CR, and save the file as `nodemaintenance-cr.yaml`: + [source,yaml] ---- apiVersion: nodemaintenance.medik8s.io/v1beta1 kind: NodeMaintenance metadata: - name: maintenance-example <1> + name: nodemaintenance-cr <1> spec: nodeName: node-1.example.com <2> reason: "NIC replacement" <3> ---- -<1> The name of the node maintenance CR -<2> The name of the node to be put into maintenance mode -<3> A plain text description of the reason for maintenance +<1> The name of the node maintenance CR. +<2> The name of the node to be put into maintenance mode. +<3> A plain text description of the reason for maintenance. + . Apply the node maintenance CR by running the following command: + @@ -38,11 +38,11 @@ spec: $ oc apply -f nodemaintenance-cr.yaml ---- -. Check the progress of the maintenance task by running the following command, replacing `` with the name of your node: +. Check the progress of the maintenance task by running the following command, replacing `` with the name of your node; for example, `node-1.example.com`: + [source,terminal] ---- -$ oc describe node +$ oc describe node node-1.example.com ---- + .Example output diff --git a/modules/eco-setting-node-maintenance-cr-web-console.adoc b/modules/eco-setting-node-maintenance-cr-web-console.adoc new file mode 100644 index 0000000000..4ccb2a1961 --- /dev/null +++ b/modules/eco-setting-node-maintenance-cr-web-console.adoc @@ -0,0 +1,30 @@ +// Module included in the following assemblies: +// +//nodes/nodes/eco-node-maintenance-operator.adoc + +:_content-type: PROCEDURE +[id="eco-setting-node-maintenance-web-console_{context}"] += Setting a node to maintenance mode by using the web console + +To set a node to maintenance mode, you can create a `NodeMaintenance` custom resource (CR) by using the web console. + +.Prerequisites + +* Log in as a user with `cluster-admin` privileges. +* Install the Node Maintenance Operator from the *OperatorHub*. + +.Procedure + +. From the *Administrator* perspective in the web console, navigate to *Operators* → *Installed Operators*. + +. Select the Node Maintenance Operator from the list of Operators. + +. In the *Node Maintenance* tab, click *Create NodeMaintenance*. + +. In the *Create NodeMaintenance* page, select the *Form view* or the *YAML view* to configure the `NodeMaintenance` CR. + +. To apply the `NodeMaintenance` CR that you have configured, click *Create*. + +.Verification + +In the *Node Maintenance* tab, inspect the `Status` column and verify that its status is `Succeeded`. \ No newline at end of file diff --git a/nodes/nodes/eco-node-maintenance-operator.adoc b/nodes/nodes/eco-node-maintenance-operator.adoc index b5ea43ecbd..fc1167d224 100644 --- a/nodes/nodes/eco-node-maintenance-operator.adoc +++ b/nodes/nodes/eco-node-maintenance-operator.adoc @@ -29,13 +29,11 @@ The Node Maintenance Operator is supported in a restricted network environment. [id="setting-node-in-maintenance-mode"] == Setting a node to maintenance mode -You can place a node into maintenance from the CLI or by using a `NodeMaintenance` CR. +You can place a node into maintenance from the web console or in the CLI by using a `NodeMaintenance` CR. -include::modules/eco-setting-node-maintenance-cli.adoc[leveloffset=+2] +include::modules/eco-setting-node-maintenance-cr-web-console.adoc[leveloffset=+2] -include::modules/eco-setting-node-to-maintenance-mode-with-cr.adoc[leveloffset=+2] - -You can check the status of current `NodeMaintenance` CR tasks. +include::modules/eco-setting-node-maintenance-cr-cli.adoc[leveloffset=+2] include::modules/eco-checking_status_of_node_maintenance_cr_tasks.adoc[leveloffset=+3] @@ -44,11 +42,13 @@ include::modules/eco-checking_status_of_node_maintenance_cr_tasks.adoc[leveloffs You can resume a node from maintenance mode from the CLI or by using a `NodeMaintenance` CR. Resuming a node brings it out of maintenance mode and makes it schedulable again. -include::modules/eco-resuming-node-maintenance-cli.adoc[leveloffset=+2] +include::modules/eco-resuming-node-maintenance-cr-web-console.adoc[leveloffset=+2] -include::modules/eco-resuming-node-from-maintenance-mode-with-cr.adoc[leveloffset=+2] +include::modules/eco-resuming-node-maintenance-cr-cli.adoc[leveloffset=+2] [role="_additional-resources"] [id="additional-resources-node-maintenance-operator-installation"] == Additional resources -* xref:../../support/gathering-cluster-data.adoc#gathering-cluster-data[Gathering data about your cluster] \ No newline at end of file +* xref:../../support/gathering-cluster-data.adoc#gathering-cluster-data[Gathering data about your cluster] +* xref:../../nodes/nodes/nodes-nodes-working.adoc#nodes-nodes-working-evacuating_nodes-nodes-working[Understanding how to evacuate pods on nodes] +* xref:../../nodes/nodes/nodes-nodes-working.adoc#nodes-nodes-working-marking_nodes-nodes-working[Understanding how to mark nodes as unschedulable or schedulable] \ No newline at end of file