|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * upgrading/rosa-hcp-upgrading.adoc |
| 4 | + |
| 5 | +// NOTE: This module is included several times in the same upgrade assembly. |
| 6 | + |
| 7 | +:_mod-docs-content-type: PROCEDURE |
| 8 | +[id="rosa-hcp-upgrading-cli-machinepool_{context}"] |
| 9 | +// POOL-ONLY: Conditions for upgrading machine pools WITHOUT upgrading hosted control planes |
| 10 | +ifeval::["{context}" != "rosa-hcp-upgrading-whole-cluster"] |
| 11 | += Upgrading machine pools with the ROSA CLI |
| 12 | + |
| 13 | +You can manually upgrade one or more machine pools in a {hcp-title} cluster by using the ROSA CLI. This method schedules the specified machine pools for an upgrade if a more recent version is available, either immediately, or at a specified future time. |
| 14 | + |
| 15 | +[NOTE] |
| 16 | +==== |
| 17 | +Your control plane only supports machine pools within two minor Y-stream versions. For example, a {hcp-title} cluster with a control plane using version 4.15.z supports machine pools with version 4.13.z and 4.14.z, but the control plane does not support machine pools using version 4.12.z. |
| 18 | +==== |
| 19 | + |
| 20 | +.Prerequisites |
| 21 | +* You have installed and configured the latest version of the ROSA CLI. |
| 22 | +* No upgrades for the hosted control plane are in progress on the cluster, or scheduled to occur at the same time as the machine pool upgrade. |
| 23 | +endif::[] |
| 24 | +//END POOL-ONLY condition |
| 25 | +
|
| 26 | +// WHOLE CLUSTER: Conditions for upgrading machine pools as part of upgrading the whole cluster in sequence |
| 27 | +ifeval::["{context}" == "rosa-hcp-upgrading-whole-cluster"] |
| 28 | += Upgrading machine pools |
| 29 | + |
| 30 | +When your hosted control plane upgrade is complete, you can upgrade one or more machine pools simultaneously. |
| 31 | +endif::[] |
| 32 | +//END WHOLE CLUSTER condition |
| 33 | + |
| 34 | +.Procedure |
| 35 | +. Verify the current version of your cluster by running the following command: |
| 36 | ++ |
| 37 | +[source,terminal] |
| 38 | +---- |
| 39 | +$ rosa describe cluster --cluster=<cluster_name_or_id> <1> |
| 40 | +---- |
| 41 | +<1> Replace `<cluster_name_or_id>` with the cluster name or the cluster ID. |
| 42 | ++ |
| 43 | +ifeval::["{context}" != "rosa-hcp-upgrading-whole-cluster"] |
| 44 | +.Example output |
| 45 | +[source,terminal] |
| 46 | +---- |
| 47 | +OpenShift Version: 4.14.0 |
| 48 | +---- |
| 49 | +endif::[] |
| 50 | +ifeval::["{context}" == "rosa-hcp-upgrading-whole-cluster"] |
| 51 | +.Example output |
| 52 | +[source,terminal] |
| 53 | +---- |
| 54 | +OpenShift Version: 4.14.8 |
| 55 | +---- |
| 56 | +//WHOLE CLUSTER: updating the version here to show after hcp upgrade in whole cluster section |
| 57 | +endif::[] |
| 58 | + |
| 59 | +. List the versions that you can upgrade your machine pools to by running the following command: |
| 60 | ++ |
| 61 | +[source,terminal] |
| 62 | +---- |
| 63 | +$ rosa list upgrade --cluster <cluster-name> --machinepool <machinepool_name> |
| 64 | +---- |
| 65 | ++ |
| 66 | +The command returns a list of available updates, including the recommended version. |
| 67 | ++ |
| 68 | +.Example output |
| 69 | ++ |
| 70 | +[source,terminal] |
| 71 | +---- |
| 72 | +VERSION NOTES |
| 73 | +4.14.5 recommended |
| 74 | +4.14.4 |
| 75 | +4.14.3 |
| 76 | +---- |
| 77 | ++ |
| 78 | +[IMPORTANT] |
| 79 | +==== |
| 80 | +Do not upgrade your machine pool to a version higher than your control plane. If you want to move to a higher version, upgrade the control plane to that version first. |
| 81 | +==== |
| 82 | +//Is it even possible to do this? Will a higher version display? Can you specify a higher version even if it doesn't display? |
| 83 | + |
| 84 | +. Verify the upgrade behavior of the machine pools you intend to upgrade by running the following command: |
| 85 | ++ |
| 86 | +[source,terminal] |
| 87 | +---- |
| 88 | +$ rosa describe machinepool --cluster=<cluster_name_or_id> <machine_pool_name> |
| 89 | +---- |
| 90 | ++ |
| 91 | +.Example output |
| 92 | +[source,terminal] |
| 93 | +---- |
| 94 | +Replicas: 5 |
| 95 | +Node drain grace period: 30 minutes |
| 96 | +
|
| 97 | +Management upgrade: |
| 98 | +- Type: Replace |
| 99 | +- Max surge: 20% |
| 100 | +- Max unavailable: 20% |
| 101 | +---- |
| 102 | ++ |
| 103 | +In the example, these settings allow the machine pool to provision one excess node (`max-surge` of 20% of `replicas`) and to have up to one node unavailable (`max-unavailable` of 20% of `replicas`) during an upgrade. This machine pool can therefore upgrade two nodes at a time, by provisioning one new node in excess of the replica count, and by making one node unavailable and replacing it. Node upgrades may be delayed by up to 30 minutes (`node-drain-grace-period` of 30 minutes) if necessary to protect workloads that have a pod disruption budget. |
| 104 | + |
| 105 | +. Upgrade one or more of your machine pools by running the following command: |
| 106 | ++ |
| 107 | +[source,terminal] |
| 108 | +---- |
| 109 | +$ rosa upgrade machinepool -c <cluster_name> <first_machine_pool_id> <second_machine_pool_id> [--schedule-date=<yyyy-mm-dd> --schedule-time=<HH:mm>] --version <version_number> |
| 110 | +---- |
| 111 | ++ |
| 112 | +Multiple machine pools can be upgraded simultaneously. You can schedule machine pool upgrades individually or schedule multiple upgrades in a single command. |
| 113 | + |
| 114 | +** To schedule the immediate upgrade of a specific machine pool on your cluster, run the following command: |
| 115 | ++ |
| 116 | +[source,terminal] |
| 117 | +---- |
| 118 | +$ rosa upgrade machinepool -c <cluster_name> <your_machine_pool_id> --version <version_number> |
| 119 | +---- |
| 120 | ++ |
| 121 | +Your machine pool is scheduled for immediate upgrade, which initiates a rolling replacement of all nodes in the specified machine pool. |
| 122 | + |
| 123 | +** To schedule an upgrade of multiple machine pools to start at a future date, run the following command: |
| 124 | ++ |
| 125 | +[source,terminal] |
| 126 | +---- |
| 127 | +$ rosa upgrade machinepool -c <cluster_name> <first_machine_pool_id> <second_machine_pool_id> --schedule-date=<yyyy-mm-dd> --schedule-time=<HH:mm> --version <version_number> |
| 128 | +---- |
| 129 | ++ |
| 130 | +Your machine pools are scheduled to begin an upgrade at the specified time and date in Coordinated Universal Time (UTC). This will initiate a rolling replacement of all nodes in the specified machine pools, beginning at the specified time. |
| 131 | + |
| 132 | +.Troubleshooting |
| 133 | +* Sometimes a scheduled upgrade does not initiate. See link:https://access.redhat.com/solutions/6648291[Upgrade maintenance canceled] for more information. |
0 commit comments