11.6. 创建没有 AWS STS 的 ROSA 集群
设置环境并安装 Red Hat OpenShift Service on AWS 经典架构(ROSA)后,创建一个集群。
本文档论述了如何设置 ROSA 集群。另外,您可以使用 AWS PrivateLink 创建 ROSA 集群。
AWS 安全令牌服务(STS)是推荐的凭证模式,用于在 Red Hat OpenShift Service on AWS 经典架构上安装和与之交互,因为它提供了增强的安全性。
11.6.1. 创建集群 复制链接链接已复制到粘贴板!
您可以使用 ROSA CLI (rosa)在 AWS 经典架构(ROSA)集群上创建 Red Hat OpenShift Service。
先决条件
您已在 AWS 经典架构上安装了 Red Hat OpenShift Service。
目前,ROSA 安装不支持 AWS 共享 VPC。
流程
您可以使用默认设置或使用互动模式指定自定义设置来创建集群。要在创建集群时查看其他选项,请输入
rosa create cluster --help命令。创建集群最多可能需要 40 分钟。
注意对于生产环境工作负载,建议使用多个可用区(AZ)。默认值为单个可用区。使用
--help来手动设置这个选项,或使用互动模式进行此设置。使用默认集群设置创建集群:
rosa create cluster --cluster-name=<cluster_name>
$ rosa create cluster --cluster-name=<cluster_name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow 输出示例
I: Creating cluster with identifier '1de87g7c30g75qechgh7l5b2bha6r04e' and name 'rh-rosa-test-cluster1' I: To view list of clusters and their status, run `rosa list clusters` I: Cluster 'rh-rosa-test-cluster1' has been created. I: Once the cluster is 'Ready' you will need to add an Identity Provider and define the list of cluster administrators. See `rosa create idp --help` and `rosa create user --help` for more information. I: To determine when your cluster is Ready, run `rosa describe cluster rh-rosa-test-cluster1`.
I: Creating cluster with identifier '1de87g7c30g75qechgh7l5b2bha6r04e' and name 'rh-rosa-test-cluster1' I: To view list of clusters and their status, run `rosa list clusters` I: Cluster 'rh-rosa-test-cluster1' has been created. I: Once the cluster is 'Ready' you will need to add an Identity Provider and define the list of cluster administrators. See `rosa create idp --help` and `rosa create user --help` for more information. I: To determine when your cluster is Ready, run `rosa describe cluster rh-rosa-test-cluster1`.Copy to Clipboard Copied! Toggle word wrap Toggle overflow 使用互动提示创建集群:
rosa create cluster --interactive
$ rosa create cluster --interactiveCopy to Clipboard Copied! Toggle word wrap Toggle overflow 要配置网络 IP 范围,您可以使用以下默认范围。有关使用手动模式的更多信息,请使用
rosa create cluster --help | grep cidr命令。在交互模式中,会提示您输入设置。- 节点 CIDR: 10.0.0.0/16
- Service CIDR: 172.30.0.0/16
- Pod CIDR: 10.128.0.0/14
输入以下命令检查集群的状态。在集群创建过程中,输出中的
State字段将从pending过渡到installing,最后变为ready。rosa describe cluster --cluster=<cluster_name>
$ rosa describe cluster --cluster=<cluster_name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow 输出示例
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 注意如果安装失败,或者
State字段在 40 分钟后没有变为ready,请检查安装故障排除文档以了解更多详细信息。通过观察 OpenShift 安装程序日志来跟踪集群创建的进度:
rosa logs install --cluster=<cluster_name> --watch
$ rosa logs install --cluster=<cluster_name> --watchCopy to Clipboard Copied! Toggle word wrap Toggle overflow