10.8.2. フェデレーション設定例


以下の例は、さまざまな SPIRE フェデレーション設定を示しています。クラスター間の連携を設定する際には、これらをテンプレートとして使用してください。

例 1:ACME を使用した自動証明書管理

以下の例は、Let’s Encrypt を使用して証明書の自動プロビジョニングと更新を行うためのフェデレーションの設定方法を示しています。

apiVersion: operator.openshift.io/v1alpha1
kind: SpireServer
metadata:
  name: cluster
spec:
  trustDomain: cluster1.example.com
  federation:
    bundleEndpoint:
      profile: https_web
      refreshHint: 300
      httpsWeb:
        acme:
          directoryUrl: https://acme-v02.api.letsencrypt.org/directory
          domainName: federation.apps.cluster1.example.com
          email: admin@example.com
          tosAccepted: "true"
    federatesWith:
      - trustDomain: cluster2.example.com
        bundleEndpointUrl: https://federation.apps.cluster2.example.com
        bundleEndpointProfile: https_web
      - trustDomain: cluster3.example.com
        bundleEndpointUrl: https://federation.apps.cluster3.example.com
        bundleEndpointProfile: https_web
    managedRoute: "true"
  • プロファイル フィールドは、Web PKI 証明書ベースの認証に https_web プロファイルを使用します。
  • directoryURL フィールドは、本番環境のディレクトリーに使用されます。テストには、ステージング URL https://acme-staging-v02.api.letsencrypt.org/directory を使用してください。
例 2:cert-manager を使用した手動証明書管理

次の例は、外部で管理される証明書を使用してフェデレーションを設定する方法を示しています。

apiVersion: operator.openshift.io/v1alpha1
kind: SpireServer
metadata:
  name: cluster
spec:
  trustDomain: cluster1.example.com
  federation:
    bundleEndpoint:
      profile: https_web
      refreshHint: 300
      httpsWeb:
        servingCert:
          fileSyncInterval: 86400
          externalSecretRef: spire-server-federation-tls
    federatesWith:
      - trustDomain: cluster2.example.com
        bundleEndpointUrl: https://federation.apps.cluster2.example.com
        bundleEndpointProfile: https_web
      - trustDomain: cluster3.example.com
        bundleEndpointUrl: https://federation.apps.cluster3.example.com
        bundleEndpointProfile: https_web
    managedRoute: "true"
  • fileSyncInterval フィールドは、24 時間ごとに証明書の更新を確認します。
  • externalSecretRef フィールドは 、tls.crttls.key を含む Kubernetes Secret の名前です。
例 3:SPIRE 間フェデレーションに https_spiffe プロファイルを使用する

以下の例は、SPIFFE ベースの TLS 認証を使用してフェデレーションを設定する方法を示しています。

apiVersion: operator.openshift.io/v1alpha1
kind: SpireServer
metadata:
  name: cluster
spec:
  trustDomain: cluster1.example.com
  federation:
    bundleEndpoint:
      profile: https_spiffe
      refreshHint: 300
    federatesWith:
      - trustDomain: cluster2.example.com
        bundleEndpointUrl: https://federation.apps.cluster2.example.com
        bundleEndpointProfile: https_spiffe
        endpointSpiffeId: spiffe://cluster2.example.com/spire/server
      - trustDomain: cluster3.example.com
        bundleEndpointUrl: https://federation.apps.cluster3.example.com
        bundleEndpointProfile: https_spiffe
        endpointSpiffeId: spiffe://cluster3.example.com/spire/server
    managedRoute: "true"
  • プロファイル フィールドは、SPIFFE ベースの TLS 認証に https_spiffe プロファイルを使用します。
  • endpointSiffeId フィールドには、アイデンティティー確認に必要なリモート SPIRE サーバーの SPIFFE ID が含まれます。
例 4: 複数の認証プロファイルを使用した混合フェデレーション

次の例は、異なる認証プロファイルを使用して複数のリモートクラスターとフェデレーションを行うクラスターを示しています。

apiVersion: operator.openshift.io/v1alpha1
kind: SpireServer
metadata:
  name: cluster
spec:
  trustDomain: internal-cluster.example.com
  federation:
    bundleEndpoint:
      profile: https_spiffe
      refreshHint: 300
    federatesWith:
      # Internal cluster using SPIFFE TLS
      - trustDomain: dev-cluster.example.com
        bundleEndpointUrl: https://federation.apps.dev-cluster.example.com
        bundleEndpointProfile: https_spiffe
        endpointSpiffeId: spiffe://dev-cluster.example.com/spire/server
      # External partner using Web PKI
      - trustDomain: partner.example.com
        bundleEndpointUrl: https://federation.partner.example.com
        bundleEndpointProfile: https_web
      # Another external partner using Web PKI
      - trustDomain: vendor.example.com
        bundleEndpointUrl: https://spire-federation.vendor.example.com
        bundleEndpointProfile: https_web
    managedRoute: "true"
  • プロファイル フィールドクラスターは、https_spiffe プロファイルを使用してバンドルを公開します。
  • bundleEndpointProfile フィールドのクラスターは、https_spiffe プロファイルを使用してバンドルを公開します。
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

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

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

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

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

会社概要

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

Theme

© 2026 Red Hat
トップに戻る