18.5.3. 使用 STS 为手动模式升级 OpenShift Container Platform 集群
您要升级到的 OpenShift Container Platform 版本的发行镜像包含 ccoctl 二进制文件的版本,以及特定于该发行版本的 CredentialsRequest 对象列表。
18.5.3.1. 配置 Cloud Credential Operator 工具 复制链接链接已复制到粘贴板!
当 Cloud Credential Operator(CCO)使用 STS 以手动模式运行时,要从集群外创建和管理云凭证,提取并准备 CCO 实用程序(ccoctl)二进制文件。
ccoctl 是一个必须在 Linux 环境中运行的 Linux 二进制文件。
流程
获取 OpenShift Container Platform 发行镜像。
$ RELEASE_IMAGE=$(./openshift-install version | awk '/release image/ {print $3}')从 OpenShift Container Platform 发行镜像获取 CCO 容器镜像:
$ CCO_IMAGE=$(oc adm release info --image-for='cloud-credential-operator' $RELEASE_IMAGE)注意确保
$RELEASE_IMAGE的架构与您将使用ccoctl工具的环境的架构相匹配。将 CCO 容器镜像中的
ccoctl二进制文件提取到 OpenShift Container Platform 发行镜像中:$ oc image extract $CCO_IMAGE --file="/usr/bin/ccoctl" -a ~/.pull-secret更改权限以使
ccoctl可执行:$ chmod 775 ccoctl
验证
要验证
ccoctl是否可以使用,请显示帮助文件:$ ccoctl aws --helpccoctl aws --help的输出:Creating/updating/deleting cloud credentials objects for AWS cloud Usage: ccoctl aws [command] Available Commands: create-all Create all the required credentials objects create-iam-roles Create IAM roles create-identity-provider Create IAM identity provider create-key-pair Create a key pair delete Delete credentials objects Flags: -h, --help help for aws Use "ccoctl aws [command] --help" for more information about a command.