5.5.3. IBM Power 上のホステッドクラスターの NodePool オブジェクトのスケーリング
NodePool オブジェクトは、ホステッドクラスターの作成時に作成されます。NodePool オブジェクトをスケーリングすることで、Hosted Control Plane にさらに多くのコンピュートノードを追加できます。
手順
次のコマンドを実行して、
NodePoolオブジェクトを 2 つのノードにスケーリングします。$ oc -n <hosted_cluster_namespace> scale nodepool <nodepool_name> --replicas 2Cluster API エージェントプロバイダーは、ホステッドクラスターに割り当てられる 2 つのエージェントをランダムに選択します。これらのエージェントはさまざまな状態を経て、最終的に OpenShift Container Platform ノードとしてホステッドクラスターに参加します。エージェントは次の順序で移行フェーズを通過します。
-
binding -
discovering -
insufficient -
installing -
installing-in-progress -
added-to-existing-cluster
-
次のコマンドを実行して、スケールされた特定のエージェントのステータスを確認します。
$ oc -n <hosted_control_plane_namespace> get agent \ -o jsonpath='{range .items[*]}BMH: {@.metadata.labels.agent-install\.openshift\.io/bmh} Agent: {@.metadata.name} State: {@.status.debugInfo.state}{"\n"}{end}'出力例
BMH: Agent: 50c23cda-cedc-9bbd-bcf1-9b3a5c75804d State: known-unbound BMH: Agent: 5e498cd3-542c-e54f-0c58-ed43e28b568a State: insufficient次のコマンドを実行して、移行フェーズを表示します。
$ oc -n <hosted_control_plane_namespace> get agent出力例
NAME CLUSTER APPROVED ROLE STAGE 50c23cda-cedc-9bbd-bcf1-9b3a5c75804d hosted-forwarder true auto-assign 5e498cd3-542c-e54f-0c58-ed43e28b568a true auto-assign da503cf1-a347-44f2-875c-4960ddb04091 hosted-forwarder true auto-assign次のコマンドを実行して、ホステッドクラスターにアクセスするための
kubeconfigファイルを生成します。$ hcp create kubeconfig --namespace <hosted_cluster_namespace> \ --name <hosted_cluster_name> > <hosted_cluster_name>.kubeconfigエージェントが
added-to-existing-cluster状態に達したら、次のコマンドを入力して、OpenShift Container Platform ノードが表示されることを確認します。$ oc --kubeconfig <hosted_cluster_name>.kubeconfig get nodes出力例
NAME STATUS ROLES AGE VERSION worker-zvm-0.hostedn.example.com Ready worker 5m41s v1.24.0+3882f8f worker-zvm-1.hostedn.example.com Ready worker 6m3s v1.24.0+3882f8f次のコマンドを入力して、
NodePoolオブジェクトをスケールアップしたときに 2 台のマシンが作成されたことを確認します。$ oc -n <hosted_control_plane_namespace> get machine.cluster.x-k8s.io出力例
NAME CLUSTER NODENAME PROVIDERID PHASE AGE VERSION hosted-forwarder-79558597ff-5tbqp hosted-forwarder-crqq5 worker-zvm-0.hostedn.example.com agent://50c23cda-cedc-9bbd-bcf1-9b3a5c75804d Running 41h 4.15.0 hosted-forwarder-79558597ff-lfjfk hosted-forwarder-crqq5 worker-zvm-1.hostedn.example.com agent://5e498cd3-542c-e54f-0c58-ed43e28b568a Running 41h 4.15.0次のコマンドを実行して、クラスターのバージョンを確認します。
$ oc --kubeconfig <hosted_cluster_name>.kubeconfig get clusterversion出力例
NAME VERSION AVAILABLE PROGRESSING SINCE STATUS clusterversion.config.openshift.io/version 4.15.0 True False 40h Cluster version is 4.15.0次のコマンドを実行して、クラスター Operator のステータスを確認します。
$ oc --kubeconfig <hosted_cluster_name>.kubeconfig get clusteroperatorsクラスターの各コンポーネントについて、出力に次のクラスター Operator ステータスが表示されます。
-
NAME -
VERSION -
AVAILABLE -
PROGRESSING -
DEGRADED -
SINCE -
MESSAGE
-