11.2. 安装多架构计算集群


具有 x86_64arm64 control plane 的集群可以支持两个不同的 CPU 架构的 worker 节点。多架构集群组合了每个架构的优势并支持各种工作负载。

例如,您可以将 arm64、IBM Power®(ppc64le)或 IBM Z®(s390x) worker 节点添加到带有 x86_64 的现有 OpenShift Container Platform 集群中。

安装的主要步骤如下:

  1. 创建并注册多架构计算集群。
  2. 创建 x86_64arm64 基础架构环境,下载用于环境的 ISO 发现镜像,并添加 control plane。arm64 基础架构环境仅适用于 Amazon Web Services (AWS)和 Google Cloud (GC)。
  3. 创建 arm64 ppc64les390x 基础架构环境,下载 arm64、ppc64les390x 的 ISO 发现镜像,并添加 worker 节点。

支持的平台

有关每个 OpenShift Container Platform 版本支持的平台 ,请参阅关于带有多架构计算机器的 集群。对您安装的版本使用合适的平台。

主要步骤

  1. 启动使用 API 安装 OpenShift Container Platform 的流程。详情请参阅 其它资源 部分中的 使用辅助安装程序 API 安装
  2. 当您到达安装的"注册一个新的集群"步骤时,将集群注册为多架构计算集群:

    $ 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
    
       "control_plane_count": "<number>" 
    3
    
       "base_dns_domain": "example.com",
       "pull_secret": $pull_secret[0] | tojson
    }
    ')" | jq '.id'
    Copy to Clipboard Toggle word wrap
    注意
    1
    multi- 选项用于 OpenShift Container Platform 版本号,例如 "4.19-multi "。
    2
    将 CPU 架构设置为 "multi"
    3
    将 control plane 节点数量设置为 "3", "4", 或 "5"。OpenShift Container Platform 4.18 及更新的版本提供了 4 或 5 个 control plane 节点的选项。多架构计算集群不支持单节点 OpenShift。control_plane_count 字段替换 high_availability_mode,它已被弃用。
  3. 当您到达安装的"Registering a new infrastructure environment"步骤时,将 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'
    Copy to Clipboard Toggle word wrap
  4. 当您到达安装的"Adding hosts"步骤时,将 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
    Copy to Clipboard Toggle word wrap
  5. 下载 x86_64 架构的发现镜像。
  6. 使用生成的发现镜像引导 x86_64 架构主机。
  7. 开始安装,并等待集群完全安装好。
  8. 重复安装的"Registering a new infrastructure environment"步骤。这次,将 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"
       "control_plane_count": "3"
       "base_dns_domain": "example.com",
       "pull_secret": $pull_secret[0] | tojson
    }
    ')" | jq '.id'
    Copy to Clipboard Toggle word wrap
  9. 重复安装的"Adding hosts"步骤。这次,将 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
    Copy to Clipboard Toggle word wrap
  10. 下载 arm64、ppc64le 或 s390x 架构的发现镜像。
  11. 使用生成的发现镜像引导架构主机。
  12. 开始安装,并等待集群完全安装好。

验证

  • 运行以下命令,查看集群中的 arm64、ppc64le 或 s390x worker 节点:

    $ oc get nodes -o wide
    Copy to Clipboard Toggle word wrap
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat