Ingress が警告状態になるのはなぜですか?
Ingress セットアップの状況を確認すると、以下の例のようなエラー・メッセージが表示されます。
ibmcloud ks ingress status --cluster <cluster_name_or_ID>
OK
Ingress Status: warning
Message: One or more routers are unhealthy. See http://ibm.biz/ingress-router-ts
デフォルトの Ingress コントローラーについて確認すると、Ingress オペレーターが機能低下状態になっていることが分かります。
oc describe ingresscontroller default -n openshift-ingress-operator
....
Message: One or more other status conditions indicate a degraded state: LoadBalancerReady=False (LoadBalancerPending: The LoadBalancer service is pending)
Reason: DegradedConditions
Status: True
Type: Degraded
デフォルトでは、IBM Cloud Satellite はクラスター内にデフォルトの Red Hat OpenShift ルーターをセットアップし、ロード・バランサー・サービスを使用してこのルーターを公開します。 Satellite はホスト・インフラストラクチャーを所有および制御しないため、ロード・バランサーを自動的に作成することはできません。このため、ロード・バランサー・サービスが保留状態のままになり、Ingress オペレーターが機能低下状態を報告することになります。 ただし、クラスターへの Ingress 機能は引き続き機能します。
機能低下した Ingress オペレーターが、クラスター内の他の Red Hat OpenShift オペレーターのインストールや更新を妨げる可能性があります。
Ingress の警告状態を修正することはできませんが、Ingress コントローラーを更新して、機能低下状態が報告されないようにすることができます。 その後、クラスター内の他の Red Hat OpenShift オペレーターをインストールまたは更新できます。
-
クラスター内の既存の Ingress コントローラーの構成を取得し、その構成をローカル・マシン上の YAML ファイルに保存します。
oc get ingresscontroller default -n openshift-ingress-operator -o yaml > ingress.yaml
-
任意のエディターでファイルを開き、以下のブロックを削除します。
annotations
creationTimestamp
managedFields
status
finalizers
generation
resourceVersion
selfLink
uid
さらに、
endpointPublishingStrategy
をLoadBalancerService
ではなくPrivate
に変更します。 最終的な YAML ファイルは、以下の例のようになります。apiVersion: operator.openshift.io/v1 kind: IngressController metadata: name: default namespace: openshift-ingress-operator spec: defaultCertificate: name: mycluster-97db6e22bd363f060fa80637cd5e2463-0000 endpointPublishingStrategy: type: Private nodePlacement: tolerations: - key: dedicated value: edge
-
IngressController オペレーターをスケールダウンします。
oc scale --replicas=0 deployment/ingress-operator -n openshift-ingress-operator
-
現在のデフォルト Ingress コントローラーからファイナライザーを削除します。
oc patch ingresscontroller default -n openshift-ingress-operator -p '{"metadata":{"finalizers":null}}' --type=merge
-
クラスターから既存の Ingress コントローラーを削除します。
oc delete ingresscontroller default -n openshift-ingress-operator
-
前に作成した YAML ファイルを使用して、Ingress コントローラーを再作成します。 Red Hat OpenShift が古い構成でコントローラーを自動的に再作成するには、その前に Ingress コントローラーを再作成する必要があることに注意してください。
oc apply -f ingress.yaml
-
IngressController オペレーターをスケールアップします。
oc scale --replicas=1 deployment/ingress-operator -n openshift-ingress-operator
-
Ingress コントローラーが機能低下状態ではなくなったことを確認します。
oc describe ingresscontroller default -n openshift-ingress-operator
出力例
... Reason: IngressControllerUnavailable Status: False Type: Available Last Transition Time: 2021-11-04T21:13:37Z Status: False Type: Degraded