1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 21:46:22 +01:00

Updated docs for the standalone NMO

This commit is contained in:
Avani Bhatt
2022-01-10 17:42:10 +00:00
committed by openshift-cherrypick-robot
parent b3d3ac09f6
commit 0769d34e79
7 changed files with 78 additions and 67 deletions

View File

@@ -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 <node1>
----

View File

@@ -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.

View File

@@ -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`.

View File

@@ -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 <node1>
----
. Drain the node in preparation for maintenance.
+
[source,terminal]
----
$ oc adm drain <node1> --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.

View File

@@ -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 `<node-name>` with the name of your node:
. Check the progress of the maintenance task by running the following command, replacing `<node-name>` with the name of your node; for example, `node-1.example.com`:
+
[source,terminal]
----
$ oc describe node <node-name>
$ oc describe node node-1.example.com
----
+
.Example output

View File

@@ -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`.

View File

@@ -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]
* 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]