1.6.3. Alertmanager からサードパーティーのエンドポイントへの通信を保護する


Kubernetes Secret リソースを通じて認証情報をセキュアかつ管理可能な状態に保つことで、Alertmanager から Slack、メール、PagerDuty などのサードパーティーのエンドポイントへのセキュアな外部通信を有効にします。認可認証情報にアクセスするには、alertmanager Pod 内にマウントできる任意のコンテンツを含む Secret リソースを作成できます。

Alertmanager 設定内のシークレットを参照するには、open-cluster-management-observability namespace 内に Secret リソースコンテンツを追加し、alertmanager Pod 内にコンテンツをマウントします。たとえば、tls シークレットを作成してマウントするには、次の手順を実行します。

  1. TLS 証明書を使用して tls シークレットを作成するには、次のコマンドを実行します。

    oc create secret tls tls --cert=</path/to/cert.crt> --key=</path/to/cert.key> -n open-cluster-management-observability
  2. tls シークレットを MultiClusterObservability リソースにマウントするには、それを advanced セクションに追加します。リソースは以下の内容のようになります。

    ...
    advanced:
     alertmanager:
       secrets: ['tls']
  3. Alertmanager 設定内に tls シークレットの参照を追加するには、シークレットのパスを設定に追加します。リソースは、以下の設定のようになります。

    tls_config:
     cert_file: '/etc/alertmanager/secrets/tls/tls.crt'
     key_file: '/etc/alertmanager/secrets/tls/tls.key'
  4. シークレットが alertmanager Pod 内にあることを確認するには、次のコマンドを実行します。

    oc -n open-cluster-management-observability get secret alertmanager-config --template='{{ index .data "alertmanager.yaml" }}' |base64 -d > alertmanager.yaml

    YAML の内容は次のようになります。

    "global":
      "http_config":
        "tls_config":
          "cert_file": "/etc/alertmanager/secrets/storyverify/tls.crt"
          "key_file": "/etc/alertmanager/secrets/storyverify/tls.key"
  5. alertmanager.yaml 設定を alertmanager-config シークレットに保存するには、以下のコマンドを実行します。

    oc -n open-cluster-management-observability create secret generic alertmanager-config --from-file=alertmanager.yaml --dry-run -o=yaml
  6. 以前のシークレットを新しいシークレットに置き換えるには、次のコマンドを実行します。

    oc -n open-cluster-management-observability replace secret --filename=-
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

会社概要

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

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

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

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

Legal Notice

Theme

© 2026 Red Hat
トップに戻る