跳转到主内容

如何将同一个 Trident 创建的 PVC 附加到多个 K8s 集群

Views:
2
Visibility:
Public
Votes:
0
Category:
trident-kubernetes
Specialty:
snapx
Last Updated:

适用场景

  • Astra Trident
  • Kubernetes ( K8 )
    • 永久性卷( PV )
    • 永久性卷声明( PVC )

问题描述

此过程可能是为了持续对驻留在多个 K8s 集群中的 Pod 之间共享的非结构化数据进行读写多( Read-Write-Many , RWM )访问,也可能是为了在整个应用程序迁移过程中在 K8s 集群之间逐渐移动应用程序,同时保持对非结构化数据的访问。

要求
  • 请勿在 Trident 后端定义中使用 "autoExportPolicy" 和 "autoExportCIDRs" 。  在后端定义中使用 "exportPolicy" ,该定义涵盖两个 K8s 集群中的工作节点,并手动管理此导出策略列表中的 NFS 客户端(或使用子网级别导出)。
  • 在要在 K8s 集群之间共享卷的存储类中设置 "rereclaimPolicy : Retain " 。  这意味着,在准备好删除 K8s PV 和存储卷时,您必须手动将其删除。  
  • 对于要在 K8s 集群之间共享卷的存储类,请考虑在后端使用唯一的 "storagePrefix" 并将存储类映射到该存储类。  对于使用相同 SVM 的任何后端,如果这些后端的 K8s 集群之间共享卷,请考虑执行相同的操作。

 

Sign in to view the entire content of this KB article.

New to NetApp?

Learn more about our award-winning Support

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.