库比亚丁问题。
配置数据版本:
os -rhel7.5
env -onprem server
docker - 19
kube - 18控制台输出:
[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.
[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get http://localhost:10248/healthz: dial tcp [::1]:10248: connect: connection refused.
[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get http://localhost:10248/healthz: dial tcp [::1]:10248: connect: connection refused.
[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get http://localhost:10248/healthz: dial tcp [::1]:10248: connect: connection refused.
[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get http://localhost:10248/healthz: dial tcp [::1]:10248: connect: connection refused.哪里出了问题,如何解决?
发布于 2020-06-17 10:04:27
根据你提供的信息,这里有几件事可以做。
First您可以检查坞的本地cgroupdriver和kubelet是否一致。您可以通过运行以下命令查看kubelet的配置:
cat /var/lib/kubelet/kubeadm-flags.env 要检查docker配置,只需使用:
docker info | grep Cgroup如果您需要更改它,您可以这样做:
cat << EOF > /etc/docker/daemon.json
{
"exec-opts": ["native.cgroupdriver=systemd"]
}
EOF若要更改kubelet cgroup驱动程序,您必须:
`vi /etc/systemd/system/kubelet.service.d/10-kubeadm.conf`并更新KUBELET_CGROUP_ARGS=--cgroup-driver=<systemd or cgroupfs>
第二个可能的解决方案可能是禁用交换。您可以使用以下命令来完成这一任务:
sudo swapoff -a
sudo sed -i '/ swap / s/^/#/' /etc/fstab然后重新启动一台机器,然后执行kubeadm reset,然后尝试使用kubeadm init初始化集群。
https://stackoverflow.com/questions/62216678
复制相似问题