Skip to main content
此產品有較新版本可以使用。
本繁體中文版使用機器翻譯,譯文僅供參考,若與英文版本牴觸,應以英文版本為準。

配置 Google Cloud NetApp Volumes 後端

現在您可以將 Google Cloud NetApp Volumes 設定為 Trident 的後端。您可以使用 Google Cloud NetApp Volumes 後端附加 NFS 和 SMB 磁碟區。

Google Cloud NetApp Volumes 驅動程式詳情

Trident 提供 `google-cloud-netapp-volumes`驅動程式來與叢集通訊。支援的存取模式包括:ReadWriteOnce (RWO)、ReadOnlyMany (ROX)、ReadWriteMany (RWX)、ReadWriteOncePod (RWOP)。

驅動程式 傳輸協定 volumeMode 支援的存取模式 支援的檔案系統

google-cloud-netapp-volumes

NFS SMB

檔案系統

RWO 、 ROX 、 RWX 、 RWOP

nfs, smb

GKE 的雲端身分

雲端身分可讓 Kubernetes Pod 透過以工作負載身分進行驗證來存取 Google Cloud 資源,而無需提供明確的 Google Cloud 認證。

若要在 Google Cloud 中利用雲端身分功能,您必須具備以下條件:

  • 使用 GKE 部署的 Kubernetes 叢集。

  • 在 GKE 叢集上配置工作負載身分,並在節點池上配置 GKE MetaData Server。

  • 具有 Google Cloud NetApp Volumes 管理員(roles/netapp.admin)角色或自訂角色的 GCP 服務帳戶。

  • Trident 已安裝,其中包括 cloudProvider 指定「GCP」並 cloudIdentity 指定新的 GCP 服務帳戶。以下提供範例。

    Trident 操作程式

    若要使用 Trident 操作員安裝 Trident,請編輯 tridentorchestrator_cr.yaml`以將 `cloudProvider`設定為 `"GCP",並將 cloudIdentity`設定為 `iam.gke.io/gcp-service-account: cloudvolumes-admin-sa@mygcpproject.iam.gserviceaccount.com

    例如:

    apiVersion: trident.netapp.io/v1
    kind: TridentOrchestrator
    metadata:
      name: trident
    spec:
      debug: true
      namespace: trident
      imagePullPolicy: IfNotPresent
      cloudProvider: "GCP"
      cloudIdentity: 'iam.gke.io/gcp-service-account: cloudvolumes-admin-sa@mygcpproject.iam.gserviceaccount.com'
    Helm

    使用下列環境變數設定 cloud-provider ( CP )cloud-identity ( CI ) 標誌的值:

    export CP="GCP"
    export ANNOTATION="'iam.gke.io/gcp-service-account: cloudvolumes-admin-sa@mygcpproject.iam.gserviceaccount.com'"

    以下範例安裝 Trident 並使用環境變數 $CP`將 `cloudProvider`設為 GCP,並使用環境變數 `$ANNOTATION`設置 `cloudIdentity

    helm install trident trident-operator-100.6.0.tgz --set cloudProvider=$CP --set cloudIdentity="$ANNOTATION"
    <code>tridentctl</code>

    請使用以下環境變數設定 cloud providercloud identity 標誌的值:

    export CP="GCP"
    export ANNOTATION="'iam.gke.io/gcp-service-account: cloudvolumes-admin-sa@mygcpproject.iam.gserviceaccount.com'"

    以下範例安裝 Trident 並將 cloud-provider 標誌設為 $CP,並將 cloud-identity 設定為 $ANNOTATION

    tridentctl install --cloud-provider=$CP --cloud-identity="$ANNOTATION" -n trident