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.9.2.15. 验证集群状态
您可以在安装过程中或安装后验证 OpenShift Container Platform 集群的状态:
流程
在集群环境中,导出管理员的 kubeconfig 文件:
export KUBECONFIG=<installation_directory>/auth/kubeconfig
$ export KUBECONFIG=<installation_directory>/auth/kubeconfig
1 Copy to Clipboard Copied! - 1
- 对于
<installation_directory>
,请指定安装文件保存到的目录的路径。
kubeconfig
文件包含关于集群的信息,供 CLI 用于将客户端连接到正确集群和 API 服务器。查看部署后创建的 control plane 和计算机器:
oc get nodes
$ oc get nodes
Copy to Clipboard Copied! 查看集群的版本:
oc get clusterversion
$ oc get clusterversion
Copy to Clipboard Copied! 查看 Operator 的状态:
oc get clusteroperator
$ oc get clusteroperator
Copy to Clipboard Copied! 查看集群中的所有正在运行的 pod:
oc get pods -A
$ oc get pods -A
Copy to Clipboard Copied!