6.7. ホステッドクラスターのコントロールプレーンの更新
				Hosted Control Plane でホステッドクラスターを更新することで、OpenShift Container Platform のバージョンをアップグレードできます。HostedCluster カスタムリソース (CR) の .spec.release は、コントロールプレーンのバージョンを示します。HostedCluster は、.spec.release フィールドを HostedControlPlane.spec.release に更新し、適切な Control Plane Operator のバージョンを実行します。
			
				HostedControlPlane リソースは、新しいバージョンの Cluster Version Operator (CVO) により、データプレーン内の OpenShift Container Platform コンポーネントとともに、新しいバージョンのコントロールプレーンコンポーネントのロールアウトを調整します。HostedControlPlane には次のアーティファクトが含まれています。
			
- CVO
 - Cluster Network Operator (CNO)
 - Cluster Ingress Operator
 - Kube API サーバー、スケジューラー、およびマネージャーのマニフェスト
 - Machine approver
 - Autoscaler
 - Kube API サーバー、Ignition、Konnectivity など、コントロールプレーンエンドポイントの Ingress を有効にするインフラストラクチャーリソース
 
				HostedCluster CR の .spec.release フィールドを設定すると、status.version.availableUpdates フィールドと status.version.conditionalUpdates フィールドの情報を使用してコントロールプレーンを更新できます。
			
手順
次のコマンドを実行して、ホステッドクラスターに
hypershift.openshift.io/force-upgrade-to=<openshift_release_image>アノテーションを追加します。oc annotate hostedcluster -n <hosted_cluster_namespace> <hosted_cluster_name> "hypershift.openshift.io/force-upgrade-to=<openshift_release_image>" --overwrite
$ oc annotate hostedcluster -n <hosted_cluster_namespace> <hosted_cluster_name> "hypershift.openshift.io/force-upgrade-to=<openshift_release_image>" --overwrite1 2 Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
 <hosted_cluster_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 バージョンに置き換えます。
次のコマンドを実行して、ホステッドクラスターの
spec.release.image値を変更します。oc patch hostedcluster <hosted_cluster_name> -n <hosted_cluster_namespace> --type=merge -p '{"spec":{"release":{"image":"<openshift_release_image>"}}}'$ oc patch hostedcluster <hosted_cluster_name> -n <hosted_cluster_namespace> --type=merge -p '{"spec":{"release":{"image":"<openshift_release_image>"}}}'Copy to Clipboard Copied! Toggle word wrap Toggle overflow 
検証
新しいバージョンがロールアウトされたことを確認するには、次のコマンドを実行して、ホステッドクラスターの
.status.conditionsと.status.versionの値を確認します。oc get -n <hosted_cluster_namespace> hostedcluster <hosted_cluster_name> -o yaml
$ oc get -n <hosted_cluster_namespace> hostedcluster <hosted_cluster_name> -o yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow 出力例
Copy to Clipboard Copied! Toggle word wrap Toggle overflow