|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * updating/updating_a_cluster/migrating-to-multi-payload.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: PROCEDURE |
| 6 | +[id="multiarch-migrating-cp-infra-gcp_{context}"] |
| 7 | += Migrating control plane or infra machine sets between architectures on {gcp-full} |
| 8 | + |
| 9 | +You can migrate the control plane or infra machine sets in your {gcp-short} cluster between `x86` and `arm64` architectures. |
| 10 | + |
| 11 | +.Prerequisites |
| 12 | + |
| 13 | +* You have installed the {oc-first}. |
| 14 | +* You logged in to `oc` as a user with `cluster-admin` privileges. |
| 15 | +
|
| 16 | +.Procedure |
| 17 | + |
| 18 | +. Check the architecture of the control plane or infra nodes by running the following command: |
| 19 | ++ |
| 20 | +[source,terminal] |
| 21 | +---- |
| 22 | +$ oc get nodes -o wide |
| 23 | +---- |
| 24 | ++ |
| 25 | +.Example output |
| 26 | +[source,terminal] |
| 27 | +---- |
| 28 | +NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME |
| 29 | +worker-001.example.com Ready infra 100d v1.30.7 10.x.x.x <none> Red Hat Enterprise Linux CoreOS 4xx.xx.xxxxx-0 5.x.x-xxx.x.x.el9_xx.x86_64 cri-o://1.30.x |
| 30 | +master-001.example.com Ready control-plane,master 120d v1.30.7 10.x.x.x <none> Red Hat Enterprise Linux CoreOS 4xx.xx.xxxxx-0 5.x.x-xxx.x.x.el9_xx.x86_64 cri-o://1.30.x |
| 31 | +---- |
| 32 | ++ |
| 33 | +The `KERNEL-VERSION` field in the output indicates the architecture of the nodes. |
| 34 | + |
| 35 | +. Check that your cluster uses the multi payload by running the following command: |
| 36 | ++ |
| 37 | +[source,terminal] |
| 38 | +---- |
| 39 | +$ oc adm release info -o jsonpath="{ .metadata.metadata}" |
| 40 | +---- |
| 41 | ++ |
| 42 | +If you see the following output, the cluster is multi-architecture compatible. |
| 43 | ++ |
| 44 | +[source,terminal] |
| 45 | +---- |
| 46 | +{ |
| 47 | + "release.openshift.io/architecture": "multi", |
| 48 | + "url": "https://access.redhat.com/errata/<errata_version>" |
| 49 | +} |
| 50 | +---- |
| 51 | ++ |
| 52 | +If the cluster is not using the multi payload, migrate the cluster to a multi-architecture cluster. For more information, see "Migrating to a cluster with multi-architecture compute machines". |
| 53 | + |
| 54 | +. If you use any custom image streams, update them from single-architecture to multi-architecture by running the following command for each image stream: |
| 55 | ++ |
| 56 | +-- |
| 57 | +include::snippets/update-image-stream-to-multi-arch.adoc[] |
| 58 | +-- |
| 59 | + |
| 60 | +. Select an instance type that matches the target architecture from link:https://cloud.google.com/compute/docs/general-purpose-machines[General-purpose machine family for Compute engine] (Google documentation). Check the link:https://cloud.google.com/compute/docs/regions-zones#available[Available regions and zones] table (Google documentation) to verify that the instance type is supported in your zone. |
| 61 | + |
| 62 | +. Select a supported disk type for the instance type that you selected from the "Supported disk types" section of link:https://cloud.google.com/compute/docs/general-purpose-machines[General-purpose machine family for Compute engine] (Google documentation). |
| 63 | + |
| 64 | +. Determine the {gcp-short} image that the machine set uses after migration by running the following command: |
| 65 | ++ |
| 66 | +[source,terminal] |
| 67 | +---- |
| 68 | +$ oc get configmap/coreos-bootimages \ |
| 69 | + -n openshift-machine-config-operator \ |
| 70 | + -o jsonpath='{.data.stream}' | jq \ |
| 71 | + -r '.architectures.aarch64.images.gcp' |
| 72 | +---- |
| 73 | ++ |
| 74 | +.Example output |
| 75 | +[source,terminal] |
| 76 | +---- |
| 77 | +"gcp": { |
| 78 | + "release": "415.92.202309142014-0", |
| 79 | + "project": "rhcos-cloud", |
| 80 | + "name": "rhcos-415-92-202309142014-0-gcp-aarch64" |
| 81 | + } |
| 82 | +---- |
| 83 | +Use the `project` and `name` parameters from the output to form the `image` parameter in the following format: `projects/<project>/global/images/<name>`. |
| 84 | + |
| 85 | +. To migrate the control plane to another architecture, run the following command: |
| 86 | ++ |
| 87 | +[source,terminal] |
| 88 | +---- |
| 89 | +$ oc edit controlplanemachineset.machine.openshift.io cluster -n openshift-machine-api |
| 90 | +---- |
| 91 | ++ |
| 92 | +.. Replace the `disks.type` parameter with the disk type that you selected. |
| 93 | +.. Replace the `disks.image` parameter with the `image` parameter that you formed previously. |
| 94 | +.. Replace the `machineType` parameter with the instance type that you selected. |
| 95 | + |
| 96 | +. To migrate an infra machine set to another architecture, run the following command using the ID of an infra machine set: |
| 97 | ++ |
| 98 | +[source,terminal] |
| 99 | +---- |
| 100 | +$ oc edit machineset <infra-machine-set_id> -n openshift-machine-api |
| 101 | +---- |
| 102 | ++ |
| 103 | +.. Replace the `disks.type` parameter with the disk type that you selected. |
| 104 | +.. Replace the `disks.image` parameter with the `image` parameter that you formed previously. |
| 105 | +.. Replace the `machineType` parameter with the instance type that you selected. |
0 commit comments