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

Filesystem

RWO、ROX、RWX、RWOP

nfs, smb

GKE 的云身份

云身份使 Kubernetes Pod 能够通过作为工作负载身份进行身份验证而不是提供显式 Google Cloud 凭据来访问 Google Cloud 资源。

要使用 Google Cloud 中的云身份,必须具备以下条件:

  • 使用 GKE 部署的 Kubernetes 集群。

  • 在 GKE 集群上配置的工作负载标识和在节点池上配置的 GKE MetaData 服务器。

  • 具有 Google Cloud NetApp Volumes Admin (roles/netapp.admin) 角色或自定义角色的 GCP 服务帐户。

  • Trident 已安装,包括指定 "GCP" 的 cloudProvider 和指定新 GCP 服务帐户的 cloudIdentity。下面给出了一个示例。

    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,并使用环境变量 cloudProvider`将其设置为 GCP,同时使用环境变量 `$CP`设置 `cloudIdentity$ANNOTATION

    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