ClusterD
- 通过如下命令查看K8s集群中MindCluster ClusterD的Pod,需要满足Pod的数量为3,STATUS为Running,READY为1/1。
kubectl get pods -n mindx-dl -o wide | grep clusterd
回显示例:
clusterd-84d8ffcc44-frljq 1/1 Running 0 4h44m 192.168.243.227 ubuntu <none> <none> clusterd-84d8ffcc44-rm885 1/1 Running 0 4h44m 192.168.243.199 ubuntu <none> <none> clusterd-84d8ffcc44-wst6p 1/1 Running 0 4h44m 192.168.243.197 ubuntu <none> <none>
- 执行以下命令,分别查询MindCluster ClusterD的3个Pod日志。
kubectl logs -f -n mindx-dl {MindCluster ClusterD组件的Pod名字}其中1个Pod会被选举成leader,执行集群资源管理相关业务,日志示例如下:[INFO] 2024/06/11 12:19:59.843723 CST 1 hwlog@v0.10.12/api.go:105 cluster-info.log's logger init success W0611 12:19:59.843804 1 client_config.go:617] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work. I0611 12:19:59.848110 1 leaderelection.go:248] attempting to acquire leader lease mindx-dl/clusterd... [WARN] 2024/06/11 12:19:59.860530 CST 131 main.go:80 new leader is leaderelection.k8s.io/unknown I0611 12:20:07.594260 1 leaderelection.go:258] successfully acquired lease mindx-dl/clusterd [WARN] 2024/06/11 12:20:07.594434 CST 38 main.go:80 new leader is clusterd-859bdbdf95-4qwx8_50de0882-d973-449a-9925-387149b50803 [WARN] 2024/06/11 12:20:07.594561 CST 39 main.go:65 leader election obtain, start informer W0611 12:20:07.594740 1 client_config.go:617] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work.
另外两个为备份Pod,日志示例如下:[INFO] 2024/06/11 12:20:00.321361 CST 1 hwlog@v0.10.12/api.go:105 cluster-info.log's logger init success W0611 12:20:00.321445 1 client_config.go:617] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work. I0611 12:20:00.326005 1 leaderelection.go:248] attempting to acquire leader lease mindx-dl/clusterd... [WARN] 2024/06/11 12:20:00.337695 CST 94 main.go:80 new leader is leaderelection.k8s.io/unknown [WARN] 2024/06/11 12:20:08.063672 CST 132 main.go:80 new leader is clusterd-859bdbdf95-4qwx8_50de0882-d973-449a-9925-387149b50803
父主题: 组件状态确认