# Kubernetes install failure (Get "http://localhost:10248/healthz": dial tcp 127.0.0.1:10248: connect: connection refused.)

**URL:** https://discuss.kubernetes.io/t/kubernetes-install-failure-get-http-localhost-10248-healthz-dial-tcp-127-0-0-1-connect-connection-refused/18784
**Category:** General Discussions
**Created:** [January 19, 2022, 4:33pm UTC](https://discuss.kubernetes.io/t/kubernetes-install-failure-get-http-localhost-10248-healthz-dial-tcp-127-0-0-1-connect-connection-refused/18784 "2022-01-19T16:33:17Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![chaitu526](https://avatars.discourse-cdn.com/v4/letter/c/b77776/32.png) [@chaitu526](https://discuss.kubernetes.io/u/chaitu526)
#### Post date: [January 19, 2022, 4:33pm UTC](https://discuss.kubernetes.io/t/kubernetes-install-failure-get-http-localhost-10248-healthz-dial-tcp-127-0-0-1-connect-connection-refused/18784/1 "2022-01-19T16:33:17Z")

</div>

### 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](http://localhost:10248/healthz)’ failed with error: Get “[http://localhost:10248/healthz](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](http://localhost:10248/healthz)’ failed with error: Get “[http://localhost:10248/healthz](http://localhost:10248/healthz)”: dial tcp 127.0.0.1:10248: connect: connection refused.

I also see the kubelet service is in restart loop.

---

<div class="post-metadata">

### Author: ![chaitu526](https://avatars.discourse-cdn.com/v4/letter/c/b77776/32.png) [@chaitu526](https://discuss.kubernetes.io/u/chaitu526)
#### Post date: [January 19, 2022, 4:34pm UTC](https://discuss.kubernetes.io/t/kubernetes-install-failure-get-http-localhost-10248-healthz-dial-tcp-127-0-0-1-connect-connection-refused/18784/2 "2022-01-19T16:34:21Z")

</div>

kubelet.service - kubelet: The Kubernetes Node Agent  
Loaded: loaded (/lib/systemd/system/kubelet.service; enabled; vendor preset: enabled)  
Drop-In: /etc/systemd/system/kubelet.service.d  
└─10-kubeadm.conf  
Active: activating (auto-restart) (Result: exit-code) since Wed 2022-01-19 16:13:24 UTC; 6s ago  
Docs: [Kubernetes Documentation | Kubernetes](https://kubernetes.io/docs/home/)  
Process: 27211 ExecStart=/usr/bin/kubelet $KUBELET\_KUBECONFIG\_ARGS $KUBELET\_CONFIG\_ARGS $KUBELET\_KUBEADM\_ARGS $KUBELET\_EXTRA\_ARGS (code=  
Main PID: 27211 (code=exited, status=1/FAILURE)  
lines 1-8/8 (END)

---

<div class="post-metadata">

### Author: ![Theog75](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/theog75/32/9241_2.png) [@Theog75](https://discuss.kubernetes.io/u/Theog75)
#### Post date: [January 19, 2022, 10:38pm UTC](https://discuss.kubernetes.io/t/kubernetes-install-failure-get-http-localhost-10248-healthz-dial-tcp-127-0-0-1-connect-connection-refused/18784/3 "2022-01-19T22:38:46Z")

</div>

a couple of question before we start searching for a solution:

1. could you please provide the kubernetes version you are installing?
2. could you please provide the OS version and basic conf you are using?
3. could you please provide the last lets say 30 lines from this command (while restarting kubelet):

```auto
journalctl -u kubelet -f

```

---

<div class="post-metadata">

### Author: ![sundeep](https://avatars.discourse-cdn.com/v4/letter/s/7feea3/32.png) [@sundeep](https://discuss.kubernetes.io/u/sundeep)
#### Post date: [April 6, 2022, 3:34am UTC](https://discuss.kubernetes.io/t/kubernetes-install-failure-get-http-localhost-10248-healthz-dial-tcp-127-0-0-1-connect-connection-refused/18784/4 "2022-04-06T03:34:02Z")

</div>

Hi  
following this document [How to Install a Kubernetes Cluster on CentOS 8](https://www.tecmint.com/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](http://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](http://master.giri.com) systemd[1]: kubelet.service: Main process exited, code=exited, status=1/FAILURE  
Apr 05 23:29:44 [master.giri.com](http://master.giri.com) systemd[1]: kubelet.service: Failed with result ‘exit-code’.

---

<div class="post-metadata">

### Author: ![mahasir\_devops](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/mahasir_devops/32/10084_2.png) [@mahasir\_devops](https://discuss.kubernetes.io/u/mahasir_devops)
#### Post date: [May 17, 2022, 2:52am UTC](https://discuss.kubernetes.io/t/kubernetes-install-failure-get-http-localhost-10248-healthz-dial-tcp-127-0-0-1-connect-connection-refused/18784/5 "2022-05-17T02:52:47Z")

</div>

Kubernetes version: v1.24.0  
Ubuntu 18.04

[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](http://localhost:10248/healthz)’ failed with error: Get “[http://localhost:10248/healthz](http://localhost:10248/healthz)”: dial tcp 127.0.0.1:10248: connect: connection

---

<div class="post-metadata">

### Author: ![datadogger](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/datadogger/32/9072_2.png) [@datadogger](https://discuss.kubernetes.io/u/datadogger)
#### Post date: [December 20, 2022, 4:24pm UTC](https://discuss.kubernetes.io/t/kubernetes-install-failure-get-http-localhost-10248-healthz-dial-tcp-127-0-0-1-connect-connection-refused/18784/6 "2022-12-20T16:24:32Z")

</div>

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](http://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](https://docs.docker.com/engine/install/ubuntu/) – 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
