6.14.3. Google Cloud Filestore CSI Driver Operator のインストール


6.14.3.1. Workload Identity を使用して Google Cloud Filestore CSI Driver Operator をインストールする準備

GCP Workload Identity を Google Compute Platform Filestore とともに使用する予定の場合は、Google Cloud Filestore Container Storage Interface (CSI) Driver Operator のインストール中に使用する特定のパラメーターを取得する必要があります。

前提条件

  • cluster-admin ロールを持つユーザーとしてクラスターにアクセスできる。

手順

Workload Identity を使用して Google Cloud Filestore CSI Driver Operator をインストールする準備をするには、以下を実行します。

  1. プロジェクト番号を取得します。

    1. 以下のコマンドを実行してプロジェクト ID を取得します。

      $ export PROJECT_ID=$(oc get infrastructure/cluster -o jsonpath='{.status.platformStatus.gcp.projectID}')
    2. 以下のコマンドを実行し、プロジェクト ID を使用してプロジェクト番号を取得します。

      $ gcloud projects describe $PROJECT_ID --format="value(projectNumber)"
  2. ID プール ID とプロバイダー ID を検索します。

    クラスターのインストール中に、これらのリソースの名前は、--name parameter を使用して Cloud Credential Operator ユーティリティー (ccoctl) に渡されます。「Cloud Credential Operator ユーティリティーを使用した Google Cloud リソースの作成」を参照してください。

  3. Google Cloud Filestore Operator 用の Workload Identity リソースを作成します。

    1. 次のサンプルファイルを使用して CredentialsRequest ファイルを作成します。

      Credentials Request YAML ファイルの例

      apiVersion: cloudcredential.openshift.io/v1
      kind: CredentialsRequest
      metadata:
        name: openshift-gcp-filestore-csi-driver-operator
        namespace: openshift-cloud-credential-operator
        annotations:
          include.release.openshift.io/self-managed-high-availability: "true"
          include.release.openshift.io/single-node-developer: "true"
      spec:
        serviceAccountNames:
        - gcp-filestore-csi-driver-operator
        - gcp-filestore-csi-driver-controller-sa
        secretRef:
          name: gcp-filestore-cloud-credentials
          namespace: openshift-cluster-csi-drivers
        providerSpec:
          apiVersion: cloudcredential.openshift.io/v1
      	kind: GCPProviderSpec
          predefinedRoles:
          - roles/file.editor
          - roles/resourcemanager.tagUser
          skipServiceCheck: true

    2. 次のコマンドを実行して、CredentialsRequest ファイルを使用して Google Cloud サービスアカウントを作成します。

      $ ./ccoctl gcp create-service-accounts --name=<filestore-service-account> \
      1
      
        --workload-identity-pool=<workload-identity-pool> \
      2
      
        --workload-identity-provider=<workload-identity-provider> \
      3
      
        --project=<project-id> \
      4
      
        --credentials-requests-dir=/tmp/credreq 
      5
      1
      <filestore-service-account> は、ユーザーが選択した名前です。
      2
      <workload-identity-pool> は、上記のステップ 2 から取得されます。
      3
      <workload-identity-provider> は、上記のステップ 2 から取得されます。
      4
      <project-id> は上記のステップ 1.a から取得されます。
      5
      CredentialsRequest ファイルが存在するディレクトリーの名前。

      出力例

      2025/02/10 17:47:39 Credentials loaded from gcloud CLI defaults
      2025/02/10 17:47:42 IAM service account filestore-service-account-openshift-gcp-filestore-csi-driver-operator created
      2025/02/10 17:47:44 Unable to add predefined roles to IAM service account, retrying...
      2025/02/10 17:47:59 Updated policy bindings for IAM service account filestore-service-account-openshift-gcp-filestore-csi-driver-operator
      2025/02/10 17:47:59 Saved credentials configuration to: /tmp/install-dir/ 
      1
      
      openshift-cluster-csi-drivers-gcp-filestore-cloud-credentials-credentials.yaml

      現在のディレクトリー。
    3. 次のコマンドを実行して、新しく作成されたサービスアカウントのサービスアカウントメールを見つけます。

      $ cat /tmp/install-dir/manifests/openshift-cluster-csi-drivers-gcp-filestore-cloud-credentials-credentials.yaml | yq '.data["service_account.json"]' | base64 -d | jq '.service_account_impersonation_url'

      出力例

      https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/filestore-se-openshift-g-ch8cm@openshift-gce-devel.iam.gserviceaccount.com:generateAccessToken

      この出力例では、サービスアカウントのメールは filestore-se-openshift-g-ch8cm@openshift-gce-devel.iam.gserviceaccount.com です。

結果

これで、Google Cloud Filestore CSI Driver Operator をインストールするために必要な次のパラメーターの準備ができました。

  • プロジェクト番号 - ステップ 1.b
  • プール ID - ステップ 2
  • プロバイダー ID - ステップ 2
  • サービスアカウントのメールアドレス - ステップ 3.c
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

会社概要

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

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

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

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

Legal Notice

Theme

© 2026 Red Hat
トップに戻る