Cluster information: I’m deploying kubernetes cluster master and node when. It failed during the installation. Below is the output.
[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 127.0.0.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 127.0.0.1:10248: connect: connection refused.
I also see the kubelet service is in restart loop.
Hi
following this document How to Install a Kubernetes Cluster on CentOS 8
[root@master ~]# kubeadm version
kubeadm version: &version.Info{Major:“1”, Minor:“23”, GitVersion:“v1.23.5”, GitCommit:“c285e781331a3785a7f436042c65c5641ce8a9e9”, GitTreeState:“clean”, BuildDate:“2022-03-16T15:57:37Z”, GoVersion:“go1.17.8”, Compiler:“gc”, Platform:“linux/amd64”}
Apr 05 23:29:44 master.giri.com kubelet[253558]: E0405 23:29:44.252560 253558 server.go:302] “Failed to run kubelet” err=“failed to run Kubelet: misconfiguration: kubelet cgroup driver: “systemd” is different from docker cgroup driver: “cgroupfs””
Apr 05 23:29:44 master.giri.com systemd[1]: kubelet.service: Main process exited, code=exited, status=1/FAILURE
Apr 05 23:29:44 master.giri.com systemd[1]: kubelet.service: Failed with result ‘exit-code’.
[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 127.0.0.1:10248: connect: connection
If u have followed installation guide by K8s except docker installation then this might help.
in my case, path of docker installation is causes the same issue .
issue is kubelet that is exited with status 1
OS-ubuntu 20.04
1 . install docker through k8s guide (command - apt install docker.io does not install latest
version of docker and there can be issue in installation of containerd as well) Install Docker Engine on Ubuntu | Docker Documentation – it install latest version of docker as well as containerd.
2. after installtion there will be /etc/containerd/config.toml file by default . just delete it
3. systemctl restart containerd
4. systemctl restart kubelet