3.7.2. Amazon Web Services で x86 コントロールプレーンを arm64 アーキテクチャーに移行する
Amazon Web Services (AWS) 上のクラスター内のコントロールプレーンを x86 から arm64 アーキテクチャーに移行できます。
前提条件
-
OpenShift CLI (
oc) がインストールされている。 -
cluster-admin権限を持つユーザーとしてocにログインしている。
手順
次のコマンドを実行して、コントロールプレーンノードのアーキテクチャーを確認します。
$ oc get nodes -o wide出力例
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME worker-001.example.com Ready worker 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 worker-002.example.com Ready worker 98d 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 worker-003.example.com Ready worker 98d 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 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 master-002.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 master-003.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出力の
KERNEL-VERSIONフィールドは、ノードのアーキテクチャーを示します。次のコマンドを実行して、クラスターがマルチペイロードを使用していることを確認します。
$ oc adm release info -o jsonpath="{ .metadata.metadata}"次の出力が表示された場合、クラスターはマルチアーキテクチャーと互換性があります。
{ "release.openshift.io/architecture": "multi", "url": "https://access.redhat.com/errata/<errata_version>" }クラスターがマルチペイロードを使用していない場合は、クラスターをマルチアーキテクチャークラスターに移行します。詳細は、CLI を使用したマルチアーキテクチャーのコンピュートマシンを備えたクラスターへの移行を参照してください。
次のコマンドを実行して、イメージストリームをシングルアーキテクチャーからマルチアーキテクチャーに更新します。
$ oc import-image <multiarch_image_stream_tag> --from=<registry>/<project_name>/<image_name> \ --import-mode='PreserveOriginal'次のコマンドを実行して、コントロールプレーンマシンセットを設定するための
arm64互換の Amazon Machine Image (AMI) を取得します。$ oc get configmap/coreos-bootimages -n openshift-machine-config-operator -o jsonpath='{.data.stream}' | jq -r '.architectures.aarch64.images.aws.regions."<aws_region>".image'<aws_region>は、現在のクラスターがインストールされている AWS リージョンに置き換えます。次のコマンドを実行すると、インストールされているクラスターの AWS リージョンを取得できます。$ oc get infrastructure cluster -o jsonpath='{.status.platformStatus.aws.region}'出力例
ami-xxxxxxx次のコマンドを実行して、
arm64アーキテクチャーをサポートするために、コントロールプレーンマシンセットを更新します。$ oc edit controlplanemachineset.machine.openshift.io cluster -n openshift-machine-apiinstanceTypeフィールドをarm64アーキテクチャーをサポートするタイプに更新します。ami.idフィールドをarm64アーキテクチャーと互換性のある AMI に設定します。サポートされているインスタンスタイプの詳細は、「64 ビット ARM インフラストラクチャー上の AWS のテスト済みインスタンスタイプ」を参照してください。AWS のコントロールプレーンマシンセットの設定の詳細は、「Amazon Web Services のコントロールプレーン設定オプション」を参照してください。
検証
以下のコマンドを実行して、コントロールプレーンノードが
arm64アーキテクチャー上で動作していることを確認してください。$ oc get nodes -o wide出力例
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME worker-001.example.com Ready worker 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 worker-002.example.com Ready worker 98d 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 worker-003.example.com Ready worker 98d 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 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.aarch64 cri-o://1.30.x master-002.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.aarch64 cri-o://1.30.x master-003.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.aarch64 cri-o://1.30.x