31.4. クラスター全体のプロキシー設定の確認
クラスター全体のプロキシー設定のデプロイ後に、想定通りに機能していることを確認できます。以下の手順に従ってログを確認し、実装を検証します。
前提条件
- クラスター管理者パーミッションがある。
-
OpenShift Container Platform
oc
CLI ツールがインストールされている。
手順
oc
コマンドを使用してプロキシー設定のステータスを確認します。$ oc get proxy/cluster -o yaml
-
出力のプロキシーフィールドを確認して、設定と一致していることを確認します。具体的には、
spec.httpProxy
、spec.httpsProxy
、spec.noProxy
、およびspec.trustedCA
フィールドを確認します。 Proxy
オブジェクトのステータスを検査します。$ oc get proxy/cluster -o jsonpath='{.status}'
出力例
{ status: httpProxy: http://user:xxx@xxxx:3128 httpsProxy: http://user:xxx@xxxx:3128 noProxy: .cluster.local,.svc,10.0.0.0/16,10.128.0.0/14,127.0.0.1,169.254.169.254,172.30.0.0/16,localhost,test.no-proxy.com }
Machine Config Operator (MCO)のログをチェックして、設定の変更が正常に適用されたことを確認します。
$ oc logs -n openshift-machine-config-operator $(oc get pods -n openshift-machine-config-operator -l k8s-app=machine-config-operator -o name)
- プロキシー設定が適用され、必要に応じてノードが再起動されたことを示すメッセージを探します。
Cluster Version Operator (CVO)などの外部リクエストを行うコンポーネントのログをチェックして、システムコンポーネントがプロキシーを使用していることを確認します。
$ oc logs -n openshift-cluster-version $(oc get pods -n openshift-cluster-version -l k8s-app=machine-config-operator -o name)
- 外部リクエストがプロキシー経由でルーティングされたことを示すログエントリーを探します。