8.6. ホステッドクラスターのノードプールの更新
ホステッドクラスターのノードプールを更新することで、OpenShift Container Platform のバージョンを更新できます。ノードプールのバージョンが Hosted Control Plane のバージョンを超えることはできません。
NodePool カスタムリソース (CR) の .spec.release フィールドは、ノードプールのバージョンを示します。
手順
次のコマンドを入力して、ノードプールの
spec.release.image値を変更します。$ oc patch nodepool <node_pool_name> -n <hosted_cluster_namespace> \1 --type=merge \ -p '{"spec":{"nodeDrainTimeout":"60s","release":{"image":"<openshift_release_image>"}}}'2 - 1
<node_pool_name>と<hosted_cluster_namespace>を、それぞれノードプール名とホステッドクラスターの namespace に置き換えます。- 2
<openshift_release_image>変数は、アップグレードする新しい OpenShift Container Platform リリースイメージを指定します (例:quay.io/openshift-release-dev/ocp-release:4.y.z-x86_64)。<4.y.z>をサポートされている OpenShift Container Platform バージョンに置き換えます。
検証
新しいバージョンがロールアウトされたことを確認するには、次のコマンドを実行して、ノードプールの
.status.conditions値を確認します。$ oc get -n <hosted_cluster_namespace> nodepool <node_pool_name> -o yaml出力例
status: conditions: - lastTransitionTime: "2024-05-20T15:00:40Z" message: 'Using release image: quay.io/openshift-release-dev/ocp-release:4.y.z-x86_64'1 reason: AsExpected status: "True" type: ValidReleaseImage- 1
<4.y.z>をサポートされている OpenShift Container Platform バージョンに置き換えます。