2.6.3.3. 既存の Ingress Controller のサブネットを更新する
OpenShift Container Platform で手動で指定したロードバランサーサブネットを使用して IngressController を更新することで、システム停止を回避し、サービスの安定性を維持し、ネットワーク設定を特定の要件に準拠させることができます。
手順書の例では、新しいサブネットを選択して適用する方法、設定変更を確認する方法、およびロードバランサーのプロビジョニングが正常に完了したことを確認する方法を示しています。
この手順により、新しい DNS レコードの伝播、新しいロードバランサーのプロビジョニング、およびその他の要因により、数分間の停止が発生する可能性があります。この手順を適用すると、Ingress Controller ロードバランサーの IP アドレスや正規名が変更になる場合があります。
手順
既存の IngressController に新しいサブネットを指定して変更します。
apiVersion: operator.openshift.io/v1 kind: IngressController metadata: name: <name> namespace: openshift-ingress-operator spec: domain: <domain> endpointPublishingStrategy: type: LoadBalancerService loadBalancer: scope: External providerParameters: type: AWS aws: type: Classic classicLoadBalancer: subnets: ids: - <updated_subnet> - <updated_subnet> - <updated_subnet> # ...ここでは、以下のようになります。
<name>-
IngressControllerの名前を指定します。 <domain>-
IngressControllerによってサービスされる DNS 名を指定します。 type-
更新されたサブネット ID (または名前を使用している場合は
名前) を指定します。 classicLoadBalancer-
NLB を使用する場合は、
networkLoadBalancerフィールドを使用することもできます。 ids-
サブネットを ID で指定する代わりに、
名前フィールドを使用して名前でサブネットを指定します。このパラメーターは任意です。 <update_subnet>更新されたサブネット ID (または名前を使用している場合は
名前) を指定します。重要アベイラビリティーゾーンごとに最大 1 つのサブネットを指定できます。外部 Ingress Controller にはパブリックサブネットだけを指定し、内部 Ingress Controller にはプライベートサブネットだけを指定してください。
次のコマンドを実行して、
IngressControllerのProgressing状態を調べ、サブネットの更新を適用する方法を確認します。$ oc get ingresscontroller -n openshift-ingress-operator subnets -o jsonpath="{.status.conditions[?(@.type==\"Progressing\")]}" | yq -PC出力例
lastTransitionTime: "2024-11-25T20:19:31Z" message: 'One or more status conditions indicate progressing: LoadBalancerProgressing=True (OperandsProgressing: One or more managed resources are progressing: The IngressController subnets were changed from [...] to [...]. To effectuate this change, you must delete the service: `oc -n openshift-ingress delete svc/router-<name>`; the service load-balancer will then be deprovisioned and a new one created. This will most likely cause the new load-balancer to have a different host name and IP address and cause disruption. To return to the previous state, you can revert the change to the IngressController: [...]' reason: IngressControllerProgressing status: "True" type: Progressing更新を適用するために、次のコマンドを実行して、Ingress Controller に関連付けられているサービスを削除します。
$ oc -n openshift-ingress delete svc/router-<name>
検証
ロードバランサーが正常にプロビジョニングされたことを確認するには、次のコマンドを実行して
IngressControllerの状態を確認します。$ oc get ingresscontroller -n openshift-ingress-operator <name> -o jsonpath="{.status.conditions}" | yq -PC