|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * hosted_control_planes/hcp-manage/hcp-manage-aws.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: PROCEDURE |
| 6 | +[id="hcp-migrate-aws-single-to-multiarch_{context}"] |
| 7 | += Transitioning a hosted cluster from single-architecture to multi-architecture |
| 8 | + |
| 9 | +You can transition your single-architecture 64-bit AMD hosted cluster to a multi-architecture hosted cluster on {aws-first}, to reduce the cost of running workloads on your cluster. For example, you can run existing workloads on 64-bit AMD while transitioning to 64-bit ARM and you can manage these workloads from a central Kubernetes cluster. |
| 10 | + |
| 11 | +A single-architecture hosted cluster can manage node pools of only one particular CPU architecture. However, a multi-architecture hosted cluster can manage node pools with different CPU architectures. On {aws-short}, a multi-architecture hosted cluster can manage both 64-bit AMD and 64-bit ARM node pools. |
| 12 | + |
| 13 | +.Prerequisites |
| 14 | + |
| 15 | +* You have installed an {product-title} management cluster for {aws-short} on {rh-rhacm-first} with the {mce}. |
| 16 | +* You have an existing single-architecture hosted cluster that uses 64-bit AMD variant of the {product-title} release payload. |
| 17 | +* An existing node pool that uses the same 64-bit AMD variant of the {product-title} release payload and is managed by an existing hosted cluster. |
| 18 | +* Ensure that you installed the following command-line tools: |
| 19 | +
|
| 20 | +** `oc` |
| 21 | +** `kubectl` |
| 22 | +** `hcp` |
| 23 | +** `skopeo` |
| 24 | + |
| 25 | +.Procedure |
| 26 | + |
| 27 | +. Review an existing {product-title} release image of the single-architecture hosted cluster by running the following command: |
| 28 | ++ |
| 29 | +[source,terminal] |
| 30 | +---- |
| 31 | +$ oc get hostedcluster/<hosted_cluster_name> -o jsonpath='{.spec.release.image}' <1> |
| 32 | +---- |
| 33 | ++ |
| 34 | +<1> Replace `<hosted_cluster_name>` with your hosted cluster name. |
| 35 | ++ |
| 36 | +.Example output |
| 37 | +[source,terminal] |
| 38 | +---- |
| 39 | +quay.io/openshift-release-dev/ocp-release:<4.y.z>-x86_64 <1> |
| 40 | +---- |
| 41 | +<1> Replace `<4.y.z>` with the supported {product-title} version that you use. |
| 42 | + |
| 43 | +. In your {product-title} release image, if you use the digest instead of a tag, find the multi-architecture tag version of your release image: |
| 44 | + |
| 45 | +.. Set the `OCP_VERSION` environment variable for the {product-title} version by running the following command: |
| 46 | ++ |
| 47 | +[source,terminal] |
| 48 | +---- |
| 49 | +$ OCP_VERSION=$(oc image info quay.io/openshift-release-dev/ocp-release@sha256:ac78ebf77f95ab8ff52847ecd22592b545415e1ff6c7ff7f66bf81f158ae4f5e -o jsonpath='{.config.config.Labels["io.openshift.release"]}') |
| 50 | +---- |
| 51 | + |
| 52 | +.. Set the `MULTI_ARCH_TAG` environment variable for the multi-architecture tag version of your release image by running the following command: |
| 53 | ++ |
| 54 | +[source,terminal] |
| 55 | +---- |
| 56 | +$ MULTI_ARCH_TAG=$(skopeo inspect docker://quay.io/openshift-release-dev/ocp-release@sha256:ac78ebf77f95ab8ff52847ecd22592b545415e1ff6c7ff7f66bf81f158ae4f5e | jq -r '.RepoTags' | sed 's/"//g' | sed 's/,//g' | grep -w "$OCP_VERSION-multi$" | xargs) |
| 57 | +---- |
| 58 | + |
| 59 | +.. Set the `IMAGE` environment variable for the multi-architecture release image name by running the following command: |
| 60 | ++ |
| 61 | +[source,terminal] |
| 62 | +---- |
| 63 | +$ IMAGE=quay.io/openshift-release-dev/ocp-release:$MULTI_ARCH_TAG |
| 64 | +---- |
| 65 | + |
| 66 | +.. To see the list of multi-architecture image digests, run the following command: |
| 67 | ++ |
| 68 | +[source,terminal] |
| 69 | +---- |
| 70 | +$ oc image info $IMAGE |
| 71 | +---- |
| 72 | ++ |
| 73 | +.Example output |
| 74 | +[source,terminal] |
| 75 | +---- |
| 76 | +OS DIGEST |
| 77 | +linux/amd64 sha256:b4c7a91802c09a5a748fe19ddd99a8ffab52d8a31db3a081a956a87f22a22ff8 |
| 78 | +linux/ppc64le sha256:66fda2ff6bd7704f1ba72be8bfe3e399c323de92262f594f8e482d110ec37388 |
| 79 | +linux/s390x sha256:b1c1072dc639aaa2b50ec99b530012e3ceac19ddc28adcbcdc9643f2dfd14f34 |
| 80 | +linux/arm64 sha256:7b046404572ac96202d82b6cb029b421dddd40e88c73bbf35f602ffc13017f21 |
| 81 | +---- |
| 82 | + |
| 83 | +. Transition the hosted cluster from single-architecture to multi-architecture: |
| 84 | + |
| 85 | +.. Set the multi-architecture {product-title} release image for the hosted cluster by ensuring that you use the same {product-title} version as the hosted cluster. Run the following command: |
| 86 | ++ |
| 87 | +[source,terminal] |
| 88 | +---- |
| 89 | +$ oc patch -n clusters hostedclusters/<hosted_cluster_name> -p '{"spec":{"release":{"image":"quay.io/openshift-release-dev/ocp-release:<4.x.y>-multi"}}}' --type=merge <1> |
| 90 | +---- |
| 91 | +<1> Replace `<4.y.z>` with the supported {product-title} version that you use. |
| 92 | + |
| 93 | +.. Confirm that the multi-architecture image is set in your hosted cluster by running the following command: |
| 94 | ++ |
| 95 | +[source,terminal] |
| 96 | +---- |
| 97 | +$ oc get hostedcluster/<hosted_cluster_name> -o jsonpath='{.spec.release.image}' |
| 98 | +---- |
| 99 | + |
| 100 | +. Check that the status of the `HostedControlPlane` resource is `Progressing` by running the following command: |
| 101 | ++ |
| 102 | +[source,terminal] |
| 103 | +---- |
| 104 | +$ oc get hostedcontrolplane -n <hosted_control_plane_namespace> -oyaml |
| 105 | +---- |
| 106 | ++ |
| 107 | +.Example output |
| 108 | +[source,yaml] |
| 109 | +---- |
| 110 | +#... |
| 111 | + - lastTransitionTime: "2024-07-28T13:07:18Z" |
| 112 | + message: HostedCluster is deploying, upgrading, or reconfiguring |
| 113 | + observedGeneration: 5 |
| 114 | + reason: Progressing |
| 115 | + status: "True" |
| 116 | + type: Progressing |
| 117 | +#... |
| 118 | +---- |
| 119 | + |
| 120 | +. Check that the status of the `HostedCluster` resource is `Progressing` by running the following command: |
| 121 | ++ |
| 122 | +[source,terminal] |
| 123 | +---- |
| 124 | +$ oc get hostedcluster <hosted_cluster_name> -n <hosted_cluster_namespace> -oyaml |
| 125 | +---- |
| 126 | + |
| 127 | +.Verification |
| 128 | + |
| 129 | +* Verify that a node pool is using the multi-architecture release image in your `HostedControlPlane` resource by running the following command: |
| 130 | ++ |
| 131 | +[source,terminal] |
| 132 | +---- |
| 133 | +$ oc get hostedcontrolplane -n clusters-example -oyaml |
| 134 | +---- |
| 135 | ++ |
| 136 | +.Example output |
| 137 | +[source,yaml] |
| 138 | +---- |
| 139 | +#... |
| 140 | +version: |
| 141 | + availableUpdates: null |
| 142 | + desired: |
| 143 | + image: quay.io/openshift-release-dev/ocp-release:<4.x.y>-multi <1> |
| 144 | + url: https://access.redhat.com/errata/RHBA-2024:4855 |
| 145 | + version: 4.16.5 |
| 146 | + history: |
| 147 | + - completionTime: "2024-07-28T13:10:58Z" |
| 148 | + image: quay.io/openshift-release-dev/ocp-release:<4.x.y>-multi |
| 149 | + startedTime: "2024-07-28T13:10:27Z" |
| 150 | + state: Completed |
| 151 | + verified: false |
| 152 | + version: <4.x.y> |
| 153 | +---- |
| 154 | +<1> Replace `<4.y.z>` with the supported {product-title} version that you use. |
| 155 | +
|
| 156 | ++ |
| 157 | +[NOTE] |
| 158 | +==== |
| 159 | +The multi-architecture {product-title} release image is updated in your `HostedCluster`, `HostedControlPlane` resources, and hosted control plane pods. However, your existing node pools do not transition with the multi-architecture image automatically, because the release image transition is decoupled between the hosted cluster and node pools. You must create new node pools on your new multi-architecture hosted cluster. |
| 160 | +==== |
| 161 | + |
| 162 | +.Next steps |
| 163 | + |
| 164 | +* Creating node pools on the multi-architecture hosted cluster |
0 commit comments