第12章 外部ネットワークアクセス用のプロキシーの設定


ネットワーク設定でプロキシー経由のアウトバウンドトラフィックが制限されている場合は、Red Hat Advanced Cluster Security for Kubernetes でプロキシー設定を設定して、プロキシー経由でトラフィックをルーティングできます。

Red Hat Advanced Cluster Security for Kubernetes でプロキシーを使用する場合:

  • Central および Scanner からのすべての出力 HTTP、HTTPS、およびその他の TCP トラフィックは、プロキシーを通過します。
  • Central と Scanner 間のトラフィックはプロキシーを通過しません。
  • プロキシー設定は、他の Red Hat Advanced Cluster Security for Kubernetes コンポーネントには影響しません。
  • オフラインモードを使用しておらず、セキュアクラスターで実行されている Collector が実行時に追加の eBPF プローブをダウンロードする必要がある場合:

    • Collector は Sensor に接続してダウンロードを試みます。
    • 次に、Sensor はこのリクエストを Central に転送します。
    • Central はプロキシーを使用して、https://collector-modules.stackrox.io でモジュールまたはプローブを見つけます。

12.1. 既存のデプロイメントでのプロキシーの設定

既存のデプロイメントでプロキシーを設定するには、proxy-config シークレットを YAML ファイルとしてエクスポートし、そのファイルのプロキシー設定を更新して、シークレットとしてアップロードする必要があります。

注記

OpenShift Container Platform クラスターにグローバルプロキシーを設定している場合、Operator Lifecycle Manager (OLM) はクラスター全体のプロキシーで管理する Operator を自動的に設定します。ただし、インストールされた Operator をグローバルプロキシーをオーバーライドするか、カスタム認証局 (CA) 証明書を注入するように設定することもできます。

詳細は、Operator Lifecycle Manager でのプロキシーサポートの設定 を参照してください。

手順

  1. 既存のシークレットを YAML ファイルとして保存します。

    $ oc -n stackrox get secret proxy-config \
      -o go-template='{{index .data "config.yaml" | \
      base64decode}}{{"\n"}}' > /tmp/proxy-config.yaml
    Copy to Clipboard Toggle word wrap
  2. YAML 設定ファイルで変更するフィールドを編集します。以下に例を示します。

        # # NOTE: Both central and scanner should be restarted if this secret is changed.
        # # While it is possible that some components will pick up the new proxy configuration
        # # without a restart, it cannot be guaranteed that this will apply to every possible
        # # integration etc.
        # url: http://proxy.name:port
        # username: username
        # password: password
        # # If the following value is set to true, the proxy wil NOT be excluded for the default hosts:
        # # - *.stackrox, *.stackrox.svc
        # # - localhost, localhost.localdomain, 127.0.0.0/8, ::1
        # # - *.local
        # omitDefaultExcludes: false
        # excludes:  # hostnames (may include * components) for which you do not
        # # want to use a proxy, like in-cluster repositories.
        # - some.domain
        # # The following configuration sections allow specifying a different proxy to be used for HTTP(S) connections.
        # # If they are omitted, the above configuration is used for HTTP(S) connections as well as TCP connections.
        # # If only the `http` section is given, it will be used for HTTPS connections as well.
        # # Note: in most cases, a single, global proxy configuration is sufficient.
        # http:
        #   url: http://http-proxy.name:port
        #   username: username
        #   password: password
        # https:
        #   url: http://https-proxy.name:port
        #   username: username
        #   password: password
    Copy to Clipboard Toggle word wrap
  3. 変更を保存した後、次のコマンドを実行してシークレットを置き換えます。

    $ oc -n stackrox create secret generic proxy-config \
      --from-file=config.yaml=/tmp/proxy-config.yaml -o yaml --dry-run | \
      oc label -f - --local -o yaml app.kubernetes.io/name=stackrox | \
      oc apply -f -
    Copy to Clipboard Toggle word wrap
    重要
    • OpenShift Container Platform が変更を Central と Scanner に伝播するまで少なくとも 1 分待つ必要があります。
    • プロキシー設定を変更した後に発信接続に問題が発生した場合は、Central Pod と Scanner Pod を再起動する必要があります。
トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat