[英]kubelet saying node "master01" not found
我嘗試用三個master 堆疊我的kubeadm集群。 我從我的init命令收到這個問題...
[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, e.g. docker.
Here is one example how you may list all Kubernetes containers running in docker:
- 'docker ps -a | grep kube | grep -v pause'
Once you have found the failing container, you can inspect its logs with:
- 'docker logs CONTAINERID'
error execution phase wait-control-plane: couldn't initialize a Kubernetes cluster
但是我不使用 cgroupfs 而是使用systemd而且我的 kubelet 抱怨不知道他的節點名。
Jan 23 14:54:12 master01 kubelet[5620]: E0123 14:54:12.251885 5620 kubelet.go:2266] node "master01" not found
Jan 23 14:54:12 master01 kubelet[5620]: E0123 14:54:12.352932 5620 kubelet.go:2266] node "master01" not found
Jan 23 14:54:12 master01 kubelet[5620]: E0123 14:54:12.453895 5620 kubelet.go:2266] node "master01" not found
請讓我知道問題出在哪里。
如果問題與 Docker 無關,則可能是因為 Kubelet 服務未能與 API 服務器建立連接。
我會首先檢查 Kubelet 的狀態: systemctl status kubelet
並考慮使用systemctl restart kubelet
。
如果這沒有幫助,請嘗試重新安裝 kubeadm 或使用其他版本運行kubeadm init
(使用--kubernetes-version=XYZ
標志)。
就我而言,我的 k8s 版本是 1.21.1,我的 docker 版本是 19.03。 我通過將 docker 升級到 20.7 版解決了這個錯誤。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.