設定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)。
| 司機 | 協定 | 音量模式 | 支援的存取模式 | 支援的檔案系統 |
|---|---|---|---|---|
|
NFS SMB |
檔案系統 |
RWO、ROX、RWX、RWOP |
|
GKE 的雲端身份
雲端身分使 Kubernetes pod 能夠透過作為工作負載身分進行驗證來存取 Google Cloud 資源,而無需提供明確的 Google Cloud 憑證。
若要在 Google Cloud 中利用雲端身分功能,您必須具備以下條件:
-
使用 GKE 部署的 Kubernetes 叢集。
-
在 GKE 叢集上配置工作負載標識,並在節點池上配置 GKE 元資料伺服器。
-
具有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'舵使用下列環境變數設定 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並進行設置
cloudProvider`使用環境變數連接到 GCP `$CP`並設定 `cloudIdentity`使用環境變數 `$ANNOTATION:helm install trident trident-operator-100.6.0.tgz --set cloudProvider=$CP --set cloudIdentity="$ANNOTATION"
<code>tridentctl</code>請使用以下環境變數設定 雲端提供者 和 雲端身分 標誌的值:
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