第 25 章 验证安装
您可以按照本文档中的步骤在安装后检查 OpenShift Container Platform 集群的状态。
25.1. 查看安装日志
您可以在 OpenShift Container Platform 安装日志中查看安装概述。如果安装成功,日志中包括访问集群所需的信息。
先决条件
- 有访问安装主机的访问权限。
流程
查看安装主机上安装目录中的
.openshift_install.log
日志文件:$ cat <install_dir>/.openshift_install.log
输出示例
如果安装成功,日志末尾会包括集群凭证,如下例所示:
... time="2020-12-03T09:50:47Z" level=info msg="Install complete!" time="2020-12-03T09:50:47Z" level=info msg="To access the cluster as the system:admin user when using 'oc', run 'export KUBECONFIG=/home/myuser/install_dir/auth/kubeconfig'" time="2020-12-03T09:50:47Z" level=info msg="Access the OpenShift web-console here: https://console-openshift-console.apps.mycluster.example.com" time="2020-12-03T09:50:47Z" level=info msg="Login to the console with user: \"kubeadmin\", and password: \"password\"" time="2020-12-03T09:50:47Z" level=debug msg="Time elapsed per stage:" time="2020-12-03T09:50:47Z" level=debug msg=" Infrastructure: 6m45s" time="2020-12-03T09:50:47Z" level=debug msg="Bootstrap Complete: 11m30s" time="2020-12-03T09:50:47Z" level=debug msg=" Bootstrap Destroy: 1m5s" time="2020-12-03T09:50:47Z" level=debug msg=" Cluster Operators: 17m31s" time="2020-12-03T09:50:47Z" level=info msg="Time elapsed: 37m26s"