0

I am trying to set up kubernetes cluster on centos 8 and running kubeadm init on the master and the error is that

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

I uninstalled kubeadm and docker and started from scratch again, but of no use when i run journalctl -xeu kubelet the error is no such file or directory, path: /var/lib/kubelet/kubelet-config.yaml

I have been stuck with the error for a long time now, please help

tried this too , no luck - kubeadm init shows kubelet isn't running or healthy

noob_coder
  • 749
  • 4
  • 15
  • 35

1 Answers1

0

It's possible that the file is not being generated correctly during the Kubernetes initialization process.

You can try regenerating the kubelet-config.yaml

Run the following command:

sudo kubeadm init --config=/path/to/your/kubelet-config.yaml --ignore-preflight-errors=FileAvailable--var-lib-kubelet-kubelet-config.yaml

Verify the kubelet service sudo systemctl status kubelet

Or restart the kubelet service sudo systemctl restart kubelet

Since you have made multiple attempts to install Kubernetes, remnants from previous installations might be causing conflicts.

Try cleaning up the previous installation completely before attempting kubeadm init again. Use the following commands:

sudo kubeadm reset
sudo rm -rf /etc/kubernetes/
Siegfred V.
  • 1,143
  • 3
  • 12