14.6. 确保应用程序继续工作
在断开集群与网络的连接前,请确保集群按预期运行,并且所有应用程序都按预期工作。
流程
使用以下命令检查集群的状态:
确定您的 pod 正在运行:
$ oc get pods --all-namespaces
输出示例
NAMESPACE NAME READY STATUS RESTARTS AGE kube-system apiserver-watcher-ci-ln-47ltxtb-f76d1-mrffg-master-0 1/1 Running 0 39m kube-system apiserver-watcher-ci-ln-47ltxtb-f76d1-mrffg-master-1 1/1 Running 0 39m kube-system apiserver-watcher-ci-ln-47ltxtb-f76d1-mrffg-master-2 1/1 Running 0 39m openshift-apiserver-operator openshift-apiserver-operator-79c7c646fd-5rvr5 1/1 Running 3 45m openshift-apiserver apiserver-b944c4645-q694g 2/2 Running 0 29m openshift-apiserver apiserver-b944c4645-shdxb 2/2 Running 0 31m openshift-apiserver apiserver-b944c4645-x7rf2 2/2 Running 0 33m ...
确定您的节点处于 READY 状态:
$ oc get nodes
输出示例
NAME STATUS ROLES AGE VERSION ci-ln-47ltxtb-f76d1-mrffg-master-0 Ready master 42m v1.28.5 ci-ln-47ltxtb-f76d1-mrffg-master-1 Ready master 42m v1.28.5 ci-ln-47ltxtb-f76d1-mrffg-master-2 Ready master 42m v1.28.5 ci-ln-47ltxtb-f76d1-mrffg-worker-a-gsxbz Ready worker 35m v1.28.5 ci-ln-47ltxtb-f76d1-mrffg-worker-b-5qqdx Ready worker 35m v1.28.5 ci-ln-47ltxtb-f76d1-mrffg-worker-c-rjkpq Ready worker 34m v1.28.5