|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * rosa_cluster_admin/rosa_nodes/rosa-managing-worker-nodes.adoc |
| 4 | +//this module applies to ROSA HCP only |
| 5 | + |
| 6 | +:_mod-docs-content-type: PROCEDURE |
| 7 | +[id="rosa-node-drain-grace-period_{context}"] |
| 8 | += Configuring node drain grace periods in {hcp-title} clusters |
| 9 | + |
| 10 | +You can configure the node drain grace period for machine pools in your cluster. The node drain grace period for a machine pool is how long the cluster respects the Pod Disruption Budget protected workloads when upgrading or replacing the machine pool. After this grace period, all remaining workloads are forcibly evicted. The value range for the node drain grace period is from `0` to `1 week`. With the default value `0`, or empty value, the machine pool drains without any time limitation until complete. |
| 11 | + |
| 12 | + |
| 13 | +.Prerequisites |
| 14 | + |
| 15 | +* You installed and configured the latest {product-title} (ROSA) CLI, `rosa`, on your workstation. |
| 16 | +* You created a {hcp-title-first} cluster. |
| 17 | +* You have an existing machine pool. |
| 18 | +
|
| 19 | +.Procedure |
| 20 | + |
| 21 | +. List all of the machine pools in the cluster by running the following command: |
| 22 | ++ |
| 23 | +[source,terminal] |
| 24 | +---- |
| 25 | +$ rosa list machinepools --cluster=<cluster_name> |
| 26 | +---- |
| 27 | ++ |
| 28 | +.Example output |
| 29 | +[source,terminal] |
| 30 | +---- |
| 31 | +ID AUTOSCALING REPLICAS INSTANCE TYPE [...] AVAILABILITY ZONES SUBNET VERSION AUTOREPAIR TUNING CONFIGS |
| 32 | +workers No 2 m5.xlarge [...] us-east-1a N/A 4.14.18 Yes |
| 33 | +db-nodes-mp No 2 m5.xlarge [...] us-east-1a No 4.14.18 Yes |
| 34 | +---- |
| 35 | + |
| 36 | +. Check the node drain grace period for a machine pool by running the following command: |
| 37 | ++ |
| 38 | +[source,terminal] |
| 39 | +---- |
| 40 | +$ rosa describe machinepool --cluster <cluster_name> <machinepool_name> |
| 41 | +---- |
| 42 | ++ |
| 43 | +.Example output |
| 44 | +[source,terminal] |
| 45 | +---- |
| 46 | +ID: workers |
| 47 | +Cluster ID: 2a90jdl0i4p9r9k9956v5ocv40se1kqs |
| 48 | +Node drain grace period: <1> |
| 49 | +---- |
| 50 | ++ |
| 51 | +<1> If this value is empty, the machine pool drains without any time limitation until complete. |
| 52 | + |
| 53 | +. Optional: Update the node drain grace period for a machine pool by running the following command: |
| 54 | ++ |
| 55 | +[source,terminal] |
| 56 | +---- |
| 57 | +$ rosa edit machinepool --node-drain-grace-period="<node_drain_grace_period_value>" --cluster=<cluster_name> <machinepool_name> |
| 58 | +---- |
| 59 | ++ |
| 60 | +[NOTE] |
| 61 | +==== |
| 62 | +Changing the node drain grace period during a machine pool upgrade applies to future upgrades, not in progress upgrades. |
| 63 | +==== |
| 64 | + |
| 65 | +.Verification |
| 66 | + |
| 67 | +. Check the node drain grace period for a machine pool by running the following command: |
| 68 | ++ |
| 69 | +[source,terminal] |
| 70 | +---- |
| 71 | +$ rosa describe machinepool --cluster <cluster_name> <machinepool_name> |
| 72 | +---- |
| 73 | ++ |
| 74 | +.Example output |
| 75 | +[source,terminal] |
| 76 | +---- |
| 77 | +ID: workers |
| 78 | +Cluster ID: 2a90jdl0i4p9r9k9956v5ocv40se1kqs |
| 79 | +Node drain grace period: 30 minutes |
| 80 | +---- |
| 81 | + |
| 82 | +. Verify the correct `Node drain grace period` for your machine pool in the output. |
0 commit comments