簡體   English   中英

kubelet 說找不到節點“master01”

[英]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 版本,因為最新的 kubernetes 版本(即 v1.13.xx)支持 docker 版本 < 18.6。

實際上我也遇到了同樣的問題,但是在將 docker 版本從 18.9 降級到 18.6 后它得到了解決。

如果問題與 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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM