【问题标题】:kubelet saying node "master01" not foundkubelet 说找不到节点“master01”
【发布时间】:2019-06-17 05:02:35
【问题描述】:

我尝试将我的 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?

标签: kubernetes kubeadm kubelet


【解决方案1】:

问题可能是由于 docker 版本,因为最新的 kubernetes 版本(即 v1.13.xx)支持 docker 版本

其实我也遇到了同样的问题,但是在将 docker 版本从 18.9 降级到 18.6 后它得到了解决。

【讨论】:

    【解决方案2】:

    如果问题与 Docker 无关,可能是因为 Kubelet 服务无法建立与 API 服务器的连接。

    我会首先检查 Kubelet 的状态:systemctl status kubelet 并考虑使用 systemctl restart kubelet 重新启动。

    如果这没有帮助,请尝试重新安装 kubeadm 或使用其他版本运行 kubeadm init(使用 --kubernetes-version=X.Y.Z 标志)。

    【讨论】:

      【解决方案3】:

      就我而言,我的 k8s 版本是 1.21.1,我的 docker 版本是 19.03。我通过将 docker 升级到 20.7 版本解决了这个错误。

      【讨论】:

        猜你喜欢
        • 2020-01-05
        • 1970-01-01
        • 2020-04-04
        • 2020-06-12
        • 2019-08-10
        • 1970-01-01
        • 2017-03-10
        • 2019-07-24
        • 2019-04-30
        相关资源
        最近更新 更多