This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.1.6.19. 在用户置备的基础架构上完成安装
完成 Operator 配置后,可以在您提供的基础架构上完成集群安装。
先决条件
- 您的 control plane 已初始化。
- 已完成初始 Operator 配置。
流程
使用以下命令确认所有集群组件都已在线:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow watch -n5 oc get clusteroperators
$ watch -n5 oc get clusteroperators
输出示例
Copy to Clipboard Copied! Toggle word wrap Toggle overflow NAME VERSION AVAILABLE PROGRESSING DEGRADED SINCE authentication 4.6.0 True False False 3h56m cloud-credential 4.6.0 True False False 29h cluster-autoscaler 4.6.0 True False False 29h config-operator 4.6.0 True False False 6h39m console 4.6.0 True False False 3h59m csi-snapshot-controller 4.6.0 True False False 4h12m dns 4.6.0 True False False 4h15m etcd 4.6.0 True False False 29h image-registry 4.6.0 True False False 3h59m ingress 4.6.0 True False False 4h30m insights 4.6.0 True False False 29h kube-apiserver 4.6.0 True False False 29h kube-controller-manager 4.6.0 True False False 29h kube-scheduler 4.6.0 True False False 29h kube-storage-version-migrator 4.6.0 True False False 4h2m machine-api 4.6.0 True False False 29h machine-approver 4.6.0 True False False 6h34m machine-config 4.6.0 True False False 3h56m marketplace 4.6.0 True False False 4h2m monitoring 4.6.0 True False False 6h31m network 4.6.0 True False False 29h node-tuning 4.6.0 True False False 4h30m openshift-apiserver 4.6.0 True False False 3h56m openshift-controller-manager 4.6.0 True False False 4h36m openshift-samples 4.6.0 True False False 4h30m operator-lifecycle-manager 4.6.0 True False False 29h operator-lifecycle-manager-catalog 4.6.0 True False False 29h operator-lifecycle-manager-packageserver 4.6.0 True False False 3h59m service-ca 4.6.0 True False False 29h storage 4.6.0 True False False 4h30m
NAME VERSION AVAILABLE PROGRESSING DEGRADED SINCE authentication 4.6.0 True False False 3h56m cloud-credential 4.6.0 True False False 29h cluster-autoscaler 4.6.0 True False False 29h config-operator 4.6.0 True False False 6h39m console 4.6.0 True False False 3h59m csi-snapshot-controller 4.6.0 True False False 4h12m dns 4.6.0 True False False 4h15m etcd 4.6.0 True False False 29h image-registry 4.6.0 True False False 3h59m ingress 4.6.0 True False False 4h30m insights 4.6.0 True False False 29h kube-apiserver 4.6.0 True False False 29h kube-controller-manager 4.6.0 True False False 29h kube-scheduler 4.6.0 True False False 29h kube-storage-version-migrator 4.6.0 True False False 4h2m machine-api 4.6.0 True False False 29h machine-approver 4.6.0 True False False 6h34m machine-config 4.6.0 True False False 3h56m marketplace 4.6.0 True False False 4h2m monitoring 4.6.0 True False False 6h31m network 4.6.0 True False False 29h node-tuning 4.6.0 True False False 4h30m openshift-apiserver 4.6.0 True False False 3h56m openshift-controller-manager 4.6.0 True False False 4h36m openshift-samples 4.6.0 True False False 4h30m operator-lifecycle-manager 4.6.0 True False False 29h operator-lifecycle-manager-catalog 4.6.0 True False False 29h operator-lifecycle-manager-packageserver 4.6.0 True False False 3h59m service-ca 4.6.0 True False False 29h storage 4.6.0 True False False 4h30m
或者,通过以下命令,如果所有集群都可用您会接到通知。它还检索并显示凭证:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow ./openshift-install --dir <installation_directory> wait-for install-complete
$ ./openshift-install --dir <installation_directory> wait-for install-complete
1 - 1
- 对于
<installation_directory>
,请指定安装文件保存到的目录的路径。
输出示例
Copy to Clipboard Copied! Toggle word wrap Toggle overflow INFO Waiting up to 30m0s for the cluster to initialize...
INFO Waiting up to 30m0s for the cluster to initialize...
Cluster Version Operator 完成从 Kubernetes API 服务器部署 OpenShift Container Platform 集群时,命令运行成功。
重要-
安装程序生成的 Ignition 配置文件包含在 24 小时后过期的证书,然后在过期时进行续订。如果在更新证书前关闭集群,且集群在 24 小时后重启,集群会自动恢复过期的证书。一个例外情况是,您需要手动批准待处理的
node-bootstrapper
证书签名请求(CSR)来恢复 kubelet 证书。如需更多信息,请参阅从过期的 control plane 证书中恢复的文档。 - 建议您在生成 12 小时后使用 Ignition 配置文件,因为集群安装后 24 小时证书从 16 小时轮转至 22 小时。通过在 12 小时内使用 Ignition 配置文件,您可以避免在安装过程中运行证书更新时避免安装失败。
确认 Kubernetes API 服务器正在与 pod 通信。
要查看所有 pod 的列表,请使用以下命令:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow oc get pods --all-namespaces
$ oc get pods --all-namespaces
输出示例
Copy to Clipboard Copied! Toggle word wrap Toggle overflow NAMESPACE NAME READY STATUS RESTARTS AGE openshift-apiserver-operator openshift-apiserver-operator-85cb746d55-zqhs8 1/1 Running 1 9m openshift-apiserver apiserver-67b9g 1/1 Running 0 3m openshift-apiserver apiserver-ljcmx 1/1 Running 0 1m openshift-apiserver apiserver-z25h4 1/1 Running 0 2m openshift-authentication-operator authentication-operator-69d5d8bf84-vh2n8 1/1 Running 0 5m ...
NAMESPACE NAME READY STATUS RESTARTS AGE openshift-apiserver-operator openshift-apiserver-operator-85cb746d55-zqhs8 1/1 Running 1 9m openshift-apiserver apiserver-67b9g 1/1 Running 0 3m openshift-apiserver apiserver-ljcmx 1/1 Running 0 1m openshift-apiserver apiserver-z25h4 1/1 Running 0 2m openshift-authentication-operator authentication-operator-69d5d8bf84-vh2n8 1/1 Running 0 5m ...
使用以下命令,查看上一命令的输出中所列 pod 的日志:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow oc logs <pod_name> -n <namespace>
$ oc logs <pod_name> -n <namespace>
1 - 1
- 指定 pod 名称和命名空间,如上一命令的输出中所示。
如果 pod 日志显示,Kubernetes API 服务器可以与集群机器通信。
- 在 Cluster registration 页面注册您的集群。
您可以按照将计算机器添加到 vSphere 的内容,在集群安装完成后添加额外的计算机器。