2.6.3.4. Network Load Balancer (NLB) の AWS Elastic IP (EIP) アドレスの設定
Ingress Controller の Network Load Balancer ー (NLB) に静的 IP (別名 Elastic IP) を指定できます。これは、クラスターネットワークに適切なファイアウォールルールを設定する場合に便利です。
前提条件
- Amazon Web Services のクラスターがインストールされている必要があります。
-
IngressControllerをマッピングするサブネットの名前または ID がわかっている。
手順
以下のサンプル内容を含む YAML ファイルを作成してください。
apiVersion: operator.openshift.io/v1 kind: IngressController metadata: namespace: openshift-ingress-operator name: <name> spec: domain: <domain> endpointPublishingStrategy: loadBalancer: scope: External type: LoadBalancerService providerParameters: type: AWS aws: type: NLB networkLoadBalancer: subnets: ids: - <subnet_ID> names: - <subnet_A> - <subnet_B> eipAllocations: - <eipalloc_A> - <eipalloc_B> - <eipalloc_C>ここでは、以下のようになります。
<name>- Ingress コントローラーの名前を指定します。
<domain>- Ingress コントローラーが処理する DNS 名を指定します。
scope-
EIP の適用範囲を指定します。EIP を割り当てるには、スコープを値
Externalに設定し、インターネットに接続している必要があります。 - サブネット
- サブネットの ID と名前を指定します。ID と名前の合計数は、割り当てられた EIP と同じである必要があります。
eipAllocationsEIP アドレスを指定します。
重要アベイラビリティーゾーンごとに最大 1 つのサブネットを指定できます。外部 Ingress Controller にはパブリックサブネットのみを提供します。サブネットごとに 1 つの EIP アドレスを関連付けることができます。
次のコマンドを入力して、CR ファイルの保存と適用を実行します。
$ oc apply -f sample-ingress.yaml
検証
ロードバランサーが正常にプロビジョニングされたことを確認するために、次のコマンドを実行して
IngressControllerの状態を確認します。$ oc get ingresscontroller -n openshift-ingress-operator <name> -o jsonpath="{.status.conditions}" | yq -PC