本繁體中文版使用機器翻譯,譯文僅供參考,若與英文版本牴觸,應以英文版本為準。
在 Azure 上部署並設定 Red Hat OpenShift 容器平台
本節介紹如何在 Azure 中設定和管理 OpenShift 叢集以及在其上部署有狀態應用程式的進階工作流程。它展示瞭如何使用NetApp Cloud Volumes ONTAP儲存在Trident的幫助下提供持久卷。提供了有關使用Trident Protect 為有狀態應用程式執行資料保護和遷移活動的詳細資訊。
下圖顯示了在 Azure 上部署並使用 VPN 連接到資料中心的叢集。

|
|
有幾種方法可以在 Azure 中部署 Red Hat OpenShift Container 平台叢集。此設定的高級描述提供了所使用的特定方法的文檔連結。您可以參考"資源部分"。 |
設定過程可分為以下步驟:
從 CLI 在 Azure 上安裝 OCP 叢集。
下面給了一個範例 install-config.yaml 檔案。
apiVersion: v1
baseDomain: sddc.netapp.com
compute:
- architecture: amd64
hyperthreading: Enabled
name: worker
platform:
azure:
encryptionAtHost: false
osDisk:
diskSizeGB: 512
diskType: "StandardSSD_LRS"
type: Standard_D2s_v3
ultraSSDCapability: Disabled
#zones:
#- "1"
#- "2"
#- "3"
replicas: 3
controlPlane:
architecture: amd64
hyperthreading: Enabled
name: master
platform:
azure:
encryptionAtHost: false
osDisk:
diskSizeGB: 1024
diskType: Premium_LRS
type: Standard_D8s_v3
ultraSSDCapability: Disabled
replicas: 3
metadata:
creationTimestamp: null
name: azure-cluster
networking:
clusterNetwork:
- cidr: 10.128.0.0/14
hostPrefix: 23
machineNetwork:
- cidr: 10.0.0.0/16
networkType: OVNKubernetes
serviceNetwork:
- 172.30.0.0/16
platform:
azure:
baseDomainResourceGroupName: ocp-base-domain-rg
cloudName: AzurePublicCloud
computeSubnet: ocp-subnet2
controlPlaneSubnet: ocp-subnet1
defaultMachinePlatform:
osDisk:
diskSizeGB: 1024
diskType: "StandardSSD_LRS"
ultraSSDCapability: Disabled
networkResourceGroupName: ocp-nc-us-rg
#outboundType: UserDefinedRouting
region: northcentralus
resourceGroupName: ocp-cluster-ncusrg
virtualNetwork: ocp_vnet_ncus
publish: Internal
pullSecret:
使用BlueXP在 Azure 中部署Cloud Volumes ONTAP 。
-
在 Azure 中安裝連接器。參考說明 "這裡"。
-
使用連接器在 Azure 中部署 CVO 執行個體。請參閱說明連結: https://docs.netapp.com/us-en/bluexp-cloud-volumes-ontap/task-getting-started-azure.html [此處。 ]
使用Trident的 CSI 拓樸功能實現多區域架構
如今,雲端提供者使 Kubernetes/OpenShift 叢集管理員能夠產生基於區域的叢集節點。節點可以位於一個區域內的不同可用區,也可以跨越多個區域。為了方便在多區域架構中為工作負載配置卷, Trident使用了 CSI 拓撲。使用 CSI 拓撲功能,可以根據區域和可用區域將對磁碟區的存取限製到節點子集。參考"這裡"了解更多詳細資訊。
|
|
Kubernetes 支援兩種磁碟區綁定模式: - 當 VolumeBindingMode 設定為 Immediate(預設)時, Trident會在沒有任何拓樸感知的情況下建立磁碟區。持久性卷的建立不依賴請求 pod 的調度要求。 - 當 VolumeBindingMode 設定為 WaitForFirstConsumer 時,PVC 的持久卷的建立和綁定將被延遲,直到使用該 PVC 的 pod 被調度和建立。這樣,就可以建立磁碟區來滿足拓樸要求所強制執行的調度約束。 Trident儲存後端可設計為根據可用區域(拓撲感知後端)選擇性地配置磁碟區。對於使用此類後端的 StorageClasses,只有在受支援的區域/區域中調度的應用程式請求時才會建立磁碟區。 (拓樸感知 StorageClass)參考"這裡"了解更多詳細資訊。 |