第 18 章 在 IBM Power Virtual Server 上安装
18.1. 准备在 IBM Power Virtual Server 上安装 复制链接链接已复制到粘贴板!
本节中介绍的安装工作流用于 IBM Power® Virtual Server 基础架构环境。
18.1.1. 先决条件 复制链接链接已复制到粘贴板!
- 您可以参阅有关 OpenShift Container Platform 安装和更新 流程的详细信息。
- 您可以阅读选择集群安装方法并为用户准备它的文档。
在 IBM Power® Virtual Server 上安装 OpenShift Container Platform 前,您必须创建一个服务帐户并配置 IBM Cloud® 帐户。有关创建帐户、配置 DNS 和支持的 IBM Power® Virtual Server 区域的详情,请参阅配置 IBM Cloud® 帐户。
在将集群安装到 IBM Power® Virtual Server 时,您必须手动管理云凭证。在安装集群前,请为手动模式配置 Cloud Credential Operator (CCO)
您可以使用安装程序置备的基础架构在 IBM Power® Virtual Server 上安装 OpenShift Container Platform。此过程涉及使用安装程序为集群置备底层基础架构。目前,不支持使用用户置备的基础架构在 IBM Power® Virtual Server 上安装 OpenShift Container Platform。
有关安装程序置备安装过程的更多信息,请参阅安装过程。
18.1.3.1. 在安装程序置备的基础架构上安装集群 复制链接链接已复制到粘贴板!
您可以使用以下方法之一在 OpenShift Container Platform 安装程序置备的 IBM Power® Virtual Server 基础架构上安装集群:
- 在 IBM Power® Virtual Server 上安装自定义集群:您可以在安装程序置备的 IBM Power® Virtual Server 基础架构上安装自定义集群。安装程序允许在安装阶段应用一些自定义。其它自定义选项可在安装后使用。
- 在 IBM Power® Virtual Server 上将集群安装到现有的 VPC 中:您可以在 IBM Power® Virtual Server 上安装 OpenShift Container Platform 到现有的 Virtual Private Cloud (VPC) 中。如果您按照公司的说明设置了限制,可以使用这个安装方法,例如在创建新帐户或基础架构时的限制。
- 在 IBM Power® Virtual Server 上安装私有集群 :您可以在 IBM Power® Virtual Server 上安装私有集群。您可以使用此方法在互联网不可见的内部网络中部署 OpenShift Container Platform。
- 在受限网络中的 IBM Power® Virtual Server 上安装集群 :您可以使用安装发行内容的内部镜像在 IBM Power® Virtual Server 上安装 OpenShift Container Platform。您可以使用此方法安装不需要活跃互联网连接的集群来获取软件组件。
18.1.4. 配置 Cloud Credential Operator 工具 复制链接链接已复制到粘贴板!
Cloud Credential Operator(CCO)将云供应商凭证作为 Kubernetes 自定义资源定义(CRD)进行管理。要在 IBM Power® Virtual Server 上安装集群,您必须将 CCO 设置为手动
模式,作为安装过程的一部分。
当 Cloud Credential Operator(CCO)以手动模式运行时,要从集群外部创建和管理云凭证,提取并准备 CCO 实用程序(ccoctl
)二进制文件。
ccoctl
工具是在 Linux 环境中运行的 Linux 二进制文件。
先决条件
- 您可以访问具有集群管理员权限的 OpenShift Container Platform 帐户。
-
已安装 OpenShift CLI(
oc
)。
流程
运行以下命令,为 OpenShift Container Platform 发行镜像设置变量:
RELEASE_IMAGE=$(./openshift-install version | awk '/release image/ {print $3}')
$ RELEASE_IMAGE=$(./openshift-install version | awk '/release image/ {print $3}')
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 运行以下命令,从 OpenShift Container Platform 发行镜像获取 CCO 容器镜像:
CCO_IMAGE=$(oc adm release info --image-for='cloud-credential-operator' $RELEASE_IMAGE -a ~/.pull-secret)
$ CCO_IMAGE=$(oc adm release info --image-for='cloud-credential-operator' $RELEASE_IMAGE -a ~/.pull-secret)
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 注意确保
$RELEASE_IMAGE
的架构与将使用ccoctl
工具的环境架构相匹配。运行以下命令,将 CCO 容器镜像中的
ccoctl
二进制文件提取到 OpenShift Container Platform 发行镜像中:oc image extract $CCO_IMAGE --file="/usr/bin/ccoctl" -a ~/.pull-secret
$ oc image extract $CCO_IMAGE --file="/usr/bin/ccoctl" -a ~/.pull-secret
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 运行以下命令更改权限以使
ccoctl
可执行:chmod 775 ccoctl
$ chmod 775 ccoctl
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
验证
要验证
ccoctl
是否准备就绪,可以尝试显示帮助文件。运行命令时使用相对文件名,例如:./ccoctl.rhel9
$ ./ccoctl.rhel9
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 输出示例
Copy to Clipboard Copied! Toggle word wrap Toggle overflow