Description:-
So the issue came when i was setting up the kubernetes cluster on the AWS centos VM. Although these steps were followed every time, this particular time it resulted in the error below
[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.
Issue:-
If you google this issue you will find the solution that this occurs because of the swap which was not the case with me and definately aws instance was not having the swap configured.
So in this particular case docker was using the groupfs which i changed to systemd and thats it volla it got resolved.
Create the file as
[root@k8smaster ~]# vim /etc/docker/daemon.json
{
"exec-opts": ["native.cgroupdriver=systemd"]
}
[root@k8smaster ~]# systemctl restart docker
[root@k8smaster ~]# systemctl status docker
Thats it you problem should be resolved now and you can the kubeadm reset command followed by the kubeadm init command to reinitialise your kubernetes cluster which will work this time.
From where you get this solution...it resolve my issue...thank you...
ReplyDeleteThanks a lot buddy.
ReplyDeleteThanks Ankit.. Really its helpful for me. Where you get this idea...!
ReplyDeletethanks ankit bro...its helpful for me...
ReplyDeleteThanks Ankit :)
ReplyDeleteThis solution resolved my issue. Thanks
ReplyDeleteThank you
ReplyDeleteHi,
ReplyDeleteIt worked, Thanks.
If it doesnt work the use kubeadm=1.21.0-00 and kubelet=1.21.0-00 while installing.
solution is worked for me
ReplyDeletethank you so much. it also worked for me.
ReplyDeleteThanks Ankit. Your solution solved my setup issue
ReplyDeleteIt worked like charm
ReplyDeleteThank you. Worked for me.
ReplyDelete