12.5. 安装混合架构集群
在 OpenShift Container Platform 版本 4.12.0 及更新的版本中,带有 x86_64
control plane 的集群支持两个不同 CPU 架构的混合架构 worker 节点。混合架构集群组合了每个架构的优势并支持各种工作负载。
从 4.12.0 版本,您可以将 arm64
worker 节点添加到具有 x86_64
control plane 的现有 OpenShift 集群中。在版本 4.14.0 中,您可以将 IBM Power
或 IBM zSystems
worker 节点添加到现有的 x86_64
control plane 中。
安装的主要步骤如下:
- 创建并注册多架构集群。
-
创建
x86_64
基础架构环境,下载用于x86_64
的 ISO,并添加 control plane。control plane 必须具有x86_64
架构。 -
创建
arm64、
IBM Power
或IBM zSystems
基础架构环境,下载arm
64、IBM Power
或IBM zSystems
的 ISO,并添加 worker 节点。
这些步骤在以下流程中详细介绍。
支持的平台
下表列出了支持每个 OpenShift Container Platform 版本的混合架构集群的平台。将适当的平台用于您要安装的版本。
OpenShift Container Platform 版本 | 支持的平台 | 第 1 天 control plane 架构 | 第 2 天节点架构 |
---|---|---|---|
4.12.0 |
|
|
|
4.13.0 |
|
|
|
4.14.0 |
|
|
|
技术预览功能(TP)功能不被红帽产品服务等级协议(SLA)支持,且可能无法正常工作。红帽不推荐在生产环境中使用它们。这些技术预览功能可以使用户提早试用新的功能,并有机会在开发阶段提供反馈意见。
有关红帽技术预览功能支持范围的更多信息,请参阅技术预览功能支持范围。
主要步骤
- 启动使用 API 安装 OpenShift Container Platform 的步骤。详情 请参阅附加资源部分中的 使用 Assisted Installer API 安装。
当您达到安装的 "Registering a new cluster" 步骤时,将集群
注册为多架构
集群:$ curl -s -X POST https://api.openshift.com/api/assisted-install/v2/clusters \ -H "Authorization: Bearer ${API_TOKEN}" \ -H "Content-Type: application/json" \ -d "$(jq --null-input \ --slurpfile pull_secret ~/Downloads/pull-secret.txt ' { "name": "testcluster", "openshift_version": "<version-number>-multi", 1 "cpu_architecture" : "multi" 2 "high_availability_mode": "full" 3 "base_dns_domain": "example.com", "pull_secret": $pull_secret[0] | tojson } ')" | jq '.id'
注意当您达到安装的"注册新的基础架构环境"步骤时,将
cpu_architecture
设置为x86_64
:$ curl https://api.openshift.com/api/assisted-install/v2/infra-envs \ -H "Authorization: Bearer ${API_TOKEN}" \ -H "Content-Type: application/json" \ -d "$(jq --null-input \ --slurpfile pull_secret ~/Downloads/pull-secret.txt \ --arg cluster_id ${CLUSTER_ID} ' { "name": "testcluster-infra-env", "image_type":"full-iso", "cluster_id": $cluster_id, "cpu_architecture" : "x86_64" "pull_secret": $pull_secret[0] | tojson } ')" | jq '.id'
当您到达安装的"添加主机"步骤时,将
host_role
设置为master
:注意如需更多信息,请参阅附加资源 中的将角色分配给主机。
$ curl https://api.openshift.com/api/assisted-install/v2/infra-envs/${INFRA_ENV_ID}/hosts/<host_id> \ -X PATCH \ -H "Authorization: Bearer ${API_TOKEN}" \ -H "Content-Type: application/json" \ -d ' { "host_role":"master" } ' | jq
-
下载
x86_64
架构的发现镜像。 -
使用生成的发现镜像引导
x86_64
架构主机。 - 开始安装并等待集群被完全安装。
重复安装的"注册新的基础架构环境"步骤。这一次,将
cpu_architecture
设置为以下之一:ppc64le
(用于 IBM Power)、s390x
(用于 IBM Z)或arm64
。例如:$ curl -s -X POST https://api.openshift.com/api/assisted-install/v2/clusters \ -H "Authorization: Bearer ${API_TOKEN}" \ -H "Content-Type: application/json" \ -d "$(jq --null-input \ --slurpfile pull_secret ~/Downloads/pull-secret.txt ' { "name": "testcluster", "openshift_version": "4.12", "cpu_architecture" : "arm64" "high_availability_mode": "full" "base_dns_domain": "example.com", "pull_secret": $pull_secret[0] | tojson } ')" | jq '.id'
重复安装的"添加主机"步骤。这一次,将
host_role
设置为worker
:注意如需了解更多详细信息,请参阅附加资源 中的将角色分配给主机。
$ curl https://api.openshift.com/api/assisted-install/v2/infra-envs/${INFRA_ENV_ID}/hosts/<host_id> \ -X PATCH \ -H "Authorization: Bearer ${API_TOKEN}" \ -H "Content-Type: application/json" \ -d ' { "host_role":"worker" } ' | jq
-
下载
arm64、
或ppc64
les390x
架构的发现镜像。 - 使用生成的发现镜像引导架构主机。
- 开始安装并等待集群被完全安装。
验证
运行以下命令,查看集群中的
arm
64、ppc64le
或s390x
worker 节点:$ oc get nodes -o wide