创建部署问题时,请参考下面模板,你提供的信息越多,越容易及时获得解答。
你只花一分钟创建的问题,不能指望别人花上半个小时给你解答。
发帖前请点击 发表主题 右边的 预览(👀) 按钮,确保帖子格式正确。
操作系统信息
虚拟机 OpenEular22.03
Kubernetes版本信息
all in one 用kk安装
容器运行时
containerd 1.16
KubeSphere版本信息
v3.3.2
安装命令
./kk create cluster --with-kubernetes v1.25.3 --with-kubesphere v3.3.2 --container-manager containerd
环境
+----------+------+------+---------+----------+-------+-------+---------+-----------+--------+--------+------------+------------+-------------+------------------+--------------+
| name | sudo | curl | openssl | ebtables | socat | ipset | ipvsadm | conntrack | chrony | docker | containerd | nfs client | ceph client | glusterfs client | time |
+----------+------+------+---------+----------+-------+-------+---------+-----------+--------+--------+------------+------------+-------------+------------------+--------------+
| ecs-1227 | y | y | y | y | y | y | | y | y | | 1.6.10 | y | | y | CST 15:10:36 |
+----------+------+------+---------+----------+-------+-------+---------+-----------+--------+--------+------------+------------+-------------+------------------+--------------+
报错日志

[wait-control-plane] Waiting for the kubelet to boot up the control plane as static Pods from directory "/etc/kubernetes/manifests". This can take up to 4m0s
[kubelet-check] Initial timeout of 40s passed.
Unfortunately, an error has occurred
timed out waiting for the condition
This error is likely caused by:
- The kubelet is not running
- The kubelet is unhealthy due to a misconfiguration of the node in some way (required cgroups disabled)
If you are on a systemd-powered system, you can try to troubleshoot the error with the following commands:
- 'systemctl status kubelet'
- 'journalctl -xeu kubelet'
Additionally, a control plane component may have crashed or exited when started by the container runtime.
To troubleshoot, list all containers using your preferred container runtimes CLI.
Here is one example how you may list all running Kubernetes containers by using crictl:
- 'crictl --runtime-endpoint unix:///run/containerd/containerd.sock ps -a | grep kube | grep -v pause'
Once you have found the failing container, you can inspect its logs with:
- 'crictl --runtime-endpoint unix:///run/containerd/containerd.sock logs CONTAINERID'
error execution phase wait-control-plane: couldn't initialize a Kubernetes cluster
To see the stack trace of this error execute with --v=5 or higher: Process exited with status 1
—
执行 journalctl -xeu kubelet
后显示

Apr 21 14:19:22 ecs-1227 kubelet[50087]: E0421 14:19:22.451452 50087 kubelet.go:2448] "Error getting node" err="node \"ecs-1227\" not found"
Apr 21 14:19:22 ecs-1227 kubelet[50087]: E0421 14:19:22.552021 50087 kubelet.go:2448] "Error getting node" err="node \"ecs-1227\" not found"
Apr 21 14:19:22 ecs-1227 kubelet[50087]: W0421 14:19:22.634843 50087 reflector.go:424] vendor/k8s.io/client-go/informers/factory.go:134: failed to list *v1.CSIDriver: Get "https://lb.kubesphere.local:6443/apis/storage.k8s.io/v1/csidrivers?limit=500&resourceVersion=0">
Apr 21 14:19:22 ecs-1227 kubelet[50087]: E0421 14:19:22.634916 50087 reflector.go:140] vendor/k8s.io/client-go/informers/factory.go:134: Failed to watch *v1.CSIDriver: failed to list *v1.CSIDriver: Get "https://lb.kubesphere.local:6443/apis/storage.k8s.io/v1/csidrive>
Apr 21 14:19:22 ecs-1227 kubelet[50087]: E0421 14:19:22.652193 50087 kubelet.go:2448] "Error getting node" err="node \"ecs-1227\" not found"
Apr 21 14:19:22 ecs-1227 kubelet[50087]: E0421 14:19:22.753004 50087 kubelet.go:2448] "Error getting node" err="node \"ecs-1227\" not found"
Apr 21 14:19:22 ecs-1227 kubelet[50087]: E0421 14:19:22.853533 50087 kubelet.go:2448] "Error getting node" err="node \"ecs-1227\" not found"
Apr 21 14:19:22 ecs-1227 kubelet[50087]: E0421 14:19:22.953885 50087 kubelet.go:2448] "Error getting node" err="node \"ecs-1227\" not found"
Apr 21 14:19:22 ecs-1227 kubelet[50087]: E0421 14:19:22.999594 50087 controller.go:144] failed to ensure lease exists, will retry in 7s, error: Get "https://lb.kubesphere.local:6443/apis/coordination.k8s.io/v1/namespaces/kube-node-lease/leases/ecs-1227?timeout=10s": >
Apr 21 14:19:23 ecs-1227 kubelet[50087]: E0421 14:19:23.054702 50087 kubelet.go:2448] "Error getting node" err="node \"ecs-1227\" not found"
Apr 21 14:19:23 ecs-1227 kubelet[50087]: I0421 14:19:23.123829 50087 kubelet_node_status.go:70] "Attempting to register node" node="ecs-1227"
Apr 21 14:19:23 ecs-1227 kubelet[50087]: E0421 14:19:23.124290 50087 kubelet_node_status.go:92] "Unable to register node with API server" err="Post \"https://lb.kubesphere.local:6443/api/v1/nodes\": dial tcp 192.168.0.162:6443: connect: connection refused" node="ecs->
Apr 21 14:19:23 ecs-1227 kubelet[50087]: E0421 14:19:23.155370 50087 kubelet.go:2448] "Error getting node" err="node \"ecs-1227\" not found"
Apr 21 14:19:23 ecs-1227 kubelet[50087]: E0421 14:19:23.255727 50087 kubelet.go:2448] "Error getting node" err="node \"ecs-1227\" not found"
Apr 21 14:19:23 ecs-1227 kubelet[50087]: E0421 14:19:23.356335 50087 kubelet.go:2448] "Error getting node" err="node \"ecs-1227\" not found"
Apr 21 14:19:23 ecs-1227 kubelet[50087]: E0421 14:19:23.456414 50087 kubelet.go:2448] "Error getting node" err="node \"ecs-1227\" not found"
Apr 21 14:19:23 ecs-1227 kubelet[50087]: E0421 14:19:23.557075 50087 kubelet.go:2448] "Error getting node" err="node \"ecs-1227\" not found"
Apr 21 14:19:23 ecs-1227 kubelet[50087]: E0421 14:19:23.657437 50087 kubelet.go:2448] "Error getting node" err="node \"ecs-1227\" not found"
Apr 21 14:19:23 ecs-1227 kubelet[50087]: E0421 14:19:23.757789 50087 kubelet.go:2448] "Error getting node" err="node \"ecs-1227\" not found"
Apr 21 14:19:23 ecs-1227 kubelet[50087]: E0421 14:19:23.858320 50087 kubelet.go:2448] "Error getting node" err="node \"ecs-1227\" not found"
Apr 21 14:19:23 ecs-1227 kubelet[50087]: E0421 14:19:23.958679 50087 kubelet.go:2448] "Error getting node" err="node \"ecs-1227\" not found"
Apr 21 14:19:24 ecs-1227 kubelet[50087]: E0421 14:19:24.059069 50087 kubelet.go:2448] "Error getting node" err="node \"ecs-1227\" not found"
Apr 21 14:19:24 ecs-1227 kubelet[50087]: E0421 14:19:24.159427 50087 kubelet.go:2448] "Error getting node" err="node \"ecs-1227\" not found"
Apr 21 14:19:24 ecs-1227 kubelet[50087]: E0421 14:19:24.260419 50087 kubelet.go:2448] "Error getting node" err="node \"ecs-1227\" not found"
Apr 21 14:19:24 ecs-1227 kubelet[50087]: E0421 14:19:24.360982 50087 kubelet.go:2448] "Error getting node" err="node \"ecs-1227\" not found"
Apr 21 14:19:24 ecs-1227 kubelet[50087]: E0421 14:19:24.461945 50087 kubelet.go:2448] "Error getting node" err="node \"ecs-1227\" not found"
Apr 21 14:19:24 ecs-1227 kubelet[50087]: E0421 14:19:24.562566 50087 kubelet.go:2448] "Error getting node" err="node \"ecs-1227\" not found"
Apr 21 14:19:24 ecs-1227 kubelet[50087]: E0421 14:19:24.663022 50087 kubelet.go:2448] "Error getting node" err="node \"ecs-1227\" not found"
Apr 21 14:19:24 ecs-1227 kubelet[50087]: E0421 14:19:24.763414 50087 kubelet.go:2448] "Error getting node" err="node \"ecs-1227\" not found"
Apr 21 14:19:24 ecs-1227 kubelet[50087]: E0421 14:19:24.864339 50087 kubelet.go:2448] "Error getting node" err="node \"ecs-1227\" not found"
Apr 21 14:19:24 ecs-1227 kubelet[50087]: E0421 14:19:24.964701 50087 kubelet.go:2448] "Error getting node" err="node \"ecs-1227\" not found"
Apr 21 14:19:25 ecs-1227 kubelet[50087]: E0421 14:19:25.065113 50087 kubelet.go:2448] "Error getting node" err="node \"ecs-1227\" not found"
Apr 21 14:19:25 ecs-1227 kubelet[50087]: E0421 14:19:25.165462 50087 kubelet.go:2448] "Error getting node" err="node \"ecs-1227\" not found"
Apr 21 14:19:25 ecs-1227 kubelet[50087]: E0421 14:19:25.265814 50087 kubelet.go:2448] "Error getting node" err="node \"ecs-1227\" not found"
Apr 21 14:19:25 ecs-1227 kubelet[50087]: E0421 14:19:25.366153 50087 kubelet.go:2448] "Error getting node" err="node \"ecs-1227\" not found"
Apr 21 14:19:25 ecs-1227 kubelet[50087]: E0421 14:19:25.455967 50087 eviction_manager.go:256] "Eviction manager: failed to get summary stats" err="failed to get node info: node \"ecs-1227\" not found"
Apr 21 14:19:25 ecs-1227 kubelet[50087]: E0421 14:19:25.466710 50087 kubelet.go:2448] "Error getting node" err="node \"ecs-1227\" not found"
Apr 21 14:19:25 ecs-1227 kubelet[50087]: E0421 14:19:25.479706 50087 kubelet.go:2373] "Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized"
Apr 21 14:19:25 ecs-1227 kubelet[50087]: E0421 14:19:25.567074 50087 kubelet.go:2448] "Error getting node" err="node \"ecs-1227\" not found"
Apr 21 14:19:25 ecs-1227 kubelet[50087]: E0421 14:19:25.667340 50087 kubelet.go:2448] "Error getting node" err="node \"ecs-1227\" not found"
Apr 21 14:19:25 ecs-1227 kubelet[50087]: E0421 14:19:25.767682 50087 kubelet.go:2448] "Error getting node" err="node \"ecs-1227\" not found"
Apr 21 14:19:25 ecs-1227 kubelet[50087]: E0421 14:19:25.768126 50087 event.go:276] Unable to write event: '&v1.Event{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ObjectMeta:v1.ObjectMeta{Name:"ecs-1227.1757dea2800dc1a2", GenerateName:"", Namespace:"default", SelfLin>
Apr 21 14:19:25 ecs-1227 kubelet[50087]: E0421 14:19:25.868430 50087 kubelet.go:2448] "Error getting node" err="node \"ecs-1227\" not found"
—
再次重新执行
./kk create cluster --with-kubernetes v1.25.3 --with-kubesphere v3.3.2 --container-manager containerd
报错

14:59:53 CST [KubernetesStatusModule] Get kubernetes cluster status
14:59:54 CST stdout: [ecs-1227]
v1.25.3
14:59:54 CST stdout: [ecs-1227]
The connection to the server localhost:8080 was refused - did you specify the right host or port?
14:59:54 CST message: [ecs-1227]
get kubernetes cluster info failed: Failed to exec command: sudo -E /bin/bash -c "/usr/local/bin/kubectl --no-headers=true get nodes -o custom-col umns=:metadata.name,:status.nodeInfo.kubeletVersion,:status.addresses"
The connection to the server localhost:8080 was refused - did you specify the right host or port?: Process exited with status 1
14:59:54 CST retry: [ecs-1227]
14:59:59 CST stdout: [ecs-1227]
v1.25.3
15:00:00 CST stdout: [ecs-1227]
The connection to the server localhost:8080 was refused - did you specify the right host or port?
15:00:00 CST message: [ecs-1227]
get kubernetes cluster info failed: Failed to exec command: sudo -E /bin/bash -c "/usr/local/bin/kubectl --no-headers=true get nodes -o custom-col umns=:metadata.name,:status.nodeInfo.kubeletVersion,:status.addresses"
The connection to the server localhost:8080 was refused - did you specify the right host or port?: Process exited with status 1
15:00:00 CST retry: [ecs-1227]
15:00:05 CST stdout: [ecs-1227]
v1.25.3
15:00:05 CST stdout: [ecs-1227]
The connection to the server localhost:8080 was refused - did you specify the right host or port?
15:00:05 CST message: [ecs-1227]
get kubernetes cluster info failed: Failed to exec command: sudo -E /bin/bash -c "/usr/local/bin/kubectl --no-headers=true get nodes -o custom-col umns=:metadata.name,:status.nodeInfo.kubeletVersion,:status.addresses"
The connection to the server localhost:8080 was refused - did you specify the right host or port?: Process exited with status 1
15:00:05 CST failed: [ecs-1227]
error: Pipeline[CreateClusterPipeline] execute failed: Module[KubernetesStatusModule] exec failed:
failed: [ecs-1227] [GetClusterStatus] exec failed after 3 retires: get kubernetes cluster info failed: Failed to exec command: sudo -E /bin/bash - c "/usr/local/bin/kubectl --no-headers=true get nodes -o custom-columns=:metadata.name,:status.nodeInfo.kubeletVersion,:status.addresses"
The connection to the server localhost:8080 was refused - did you specify the right host or port?: Process exited with status 1
执行kubectl version -o json
{
"clientVersion": {
"major": "1",
"minor": "25",
"gitVersion": "v1.25.3",
"gitCommit": "434bfd82814af038ad94d62ebe59b133fcb50506",
"gitTreeState": "clean",
"buildDate": "2022-10-12T10:57:26Z",
"goVersion": "go1.19.2",
"compiler": "gc",
"platform": "linux/arm64"
},
"kustomizeVersion": "v4.5.7"
}
请教应该如何解决?