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

準備設定Azure NetApp Files 一個功能完善的後端

貢獻者

在您設定Azure NetApp Files 完後端功能之前、您必須確保符合下列要求。

NFS 和 SMB 磁碟區的必要條件

如果您是第一次使用 Azure NetApp Files 、或是在新位置使用、則必須先進行一些初始設定、才能設定 Azure NetApp Files 並建立 NFS Volume 。請參閱 "Azure:設定Azure NetApp Files 功能以建立NFS Volume"

若要設定及使用 "Azure NetApp Files" 後端、您需要下列項目:

註
  • subscriptionIDtenantIDclientIDlocation`和 `clientSecret 在 AKS 叢集上使用託管身分識別時為選用項目。

  • tenantIDclientID`和 `clientSecret 在 AKS 叢集上使用雲端身分識別時為選用項目。

  • 容量集區。請參閱 "Microsoft :為 Azure NetApp Files 建立容量集區"

  • 委派給 Azure NetApp Files 的子網路。請參閱 "Microsoft :將子網路委派給 Azure NetApp Files"

  • Azure訂閱提供的「SubscriptionID」Azure NetApp Files (含功能不支援的功能)。

  • tenantIDclientID`和 `clientSecret"應用程式註冊" 在Azure Active Directory中、具備Azure NetApp Files 充分的權限執行此功能。應用程式登錄應使用下列其中一項:

    • 擁有者或貢獻者角色 "由Azure預先定義"

    • "自訂貢獻者角色" 在訂購層級 (assignableScopes)具有下列權限、僅限於Astra Trident所需的權限。建立自訂角色之後、 "使用Azure入口網站指派角色"

      自訂參與者角色
      {
          "id": "/subscriptions/<subscription-id>/providers/Microsoft.Authorization/roleDefinitions/<role-definition-id>",
          "properties": {
              "roleName": "custom-role-with-limited-perms",
              "description": "custom role providing limited permissions",
              "assignableScopes": [
                  "/subscriptions/<subscription-id>"
              ],
              "permissions": [
                  {
                      "actions": [
                          "Microsoft.NetApp/netAppAccounts/capacityPools/read",
                          "Microsoft.NetApp/netAppAccounts/capacityPools/write",
                          "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/read",
                          "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/write",
                          "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/delete",
                          "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots/read",
                          "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots/write",
                          "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots/delete",
                          "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/MountTargets/read",
                          "Microsoft.Network/virtualNetworks/read",
                          "Microsoft.Network/virtualNetworks/subnets/read",
                          "Microsoft.Features/featureProviders/subscriptionFeatureRegistrations/read",
                          "Microsoft.Features/featureProviders/subscriptionFeatureRegistrations/write",
                          "Microsoft.Features/featureProviders/subscriptionFeatureRegistrations/delete",
                          "Microsoft.Features/features/read",
                          "Microsoft.Features/operations/read",
                          "Microsoft.Features/providers/features/read",
                          "Microsoft.Features/providers/features/register/action",
                          "Microsoft.Features/providers/features/unregister/action",
                          "Microsoft.Features/subscriptionFeatureRegistrations/read"
                      ],
                      "notActions": [],
                      "dataActions": [],
                      "notDataActions": []
                  }
              ]
          }
      }
  • Azure location 至少包含一個 "委派的子網路"。從Trident 22.01起 location 參數是後端組態檔最上層的必填欄位。會忽略虛擬資源池中指定的位置值。

  • 以供使用 Cloud Identity`請取得 `client ID"使用者指派的託管身分識別" 並在中指定該 ID azure.workload.identity/client-id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx

SMB磁碟區的其他需求

若要建立 SMB Volume 、您必須具備:

  • Active Directory 已設定並連線至 Azure NetApp Files 。請參閱 "Microsoft :建立及管理 Azure NetApp Files 的 Active Directory 連線"

  • Kubernetes叢集具備Linux控制器節點、以及至少一個執行Windows Server 2019的Windows工作節點。Astra Trident僅支援安裝在Windows節點上執行的Pod上的SMB磁碟區。

  • 至少有一個 Astra Trident 秘密、內含您的 Active Directory 認證、以便 Azure NetApp Files 能夠驗證至 Active Directory 。以產生機密 smbcreds

    kubectl create secret generic smbcreds --from-literal username=user --from-literal password='password'
  • 設定為Windows服務的SCSI Proxy。若要設定 csi-proxy、請參閱 "GitHub:csi Proxy""GitHub:適用於Windows的SCSI Proxy" 適用於Windows上執行的Kubernetes節點。