$ rosa create cluster --cluster-name=<cluster_name>
在设置环境并安装 Red Hat OpenShift Service on AWS (ROSA) 后,创建集群。
本文档介绍如何设置 ROSA 集群。或者,您可以使用 AWS PrivateLink 创建 ROSA 集群。
AWS 安全令牌服务 (STS) 是安装和与 Red Hat OpenShift Service on AWS (ROSA) 上的集群交互的推荐凭据模式,因为它提供了增强的安全性。 |
您可以使用 ROSA CLI (rosa
) 创建 Red Hat OpenShift Service on AWS (ROSA) 集群。
您已安装 Red Hat OpenShift Service on AWS。
AWS 共享 VPC 当前不支持 ROSA 安装。 |
您可以使用默认设置创建集群,也可以使用交互模式指定自定义设置。要查看创建集群时的其他选项,请输入 rosa create cluster --help
命令。
创建集群最多可能需要 40 分钟。
生产工作负载建议使用多个可用区 (AZ)。默认值为单个可用区。使用 |
要使用默认集群设置创建集群
$ rosa create cluster --cluster-name=<cluster_name>
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`.
要使用交互式提示创建集群
$ rosa create cluster --interactive
要配置网络 IP 范围,您可以使用以下默认范围。有关使用手动模式时的更多信息,请使用 rosa create cluster --help | grep cidr
命令。在交互模式下,系统会提示您输入设置。
节点 CIDR:10.0.0.0/16
服务 CIDR:172.30.0.0/16
Pod CIDR:10.128.0.0/14
输入以下命令以检查集群的状态。在集群创建期间,输出中的 State
字段将从 pending
转换为 installing
,最终转换为 ready
。
$ rosa describe cluster --cluster=<cluster_name>
Name: rh-rosa-test-cluster1
OpenShift Version: 4.6.8
DNS: *.example.com
ID: uniqueidnumber
External ID: uniqueexternalidnumber
AWS Account: 123456789101
API URL: https://api.rh-rosa-test-cluster1.example.org:6443
Console URL: https://console-openshift-console.apps.rh-rosa-test-cluster1.example.or
Nodes: Master: 3, Infra: 2, Compute: 2
Region: us-west-2
Multi-AZ: false
State: ready
Channel Group: stable
Private: No
Created: Jan 15 2021 16:30:55 UTC
Details Page: https://console.redhat.com/examplename/details/idnumber
如果安装失败或 40 分钟后 |
通过监视 OpenShift 安装程序日志来跟踪集群创建的进度
$ rosa logs install --cluster=<cluster_name> --watch