The
Initialization of the Kubeletes cluster failed with the following error:
[Root@etcd-host1 ~]# [root@etcd-host1 ~]# kubeadm init--kubernetes-version=v1.9.0--pod-network-cidr=10.244.0.0/16 [ INIT] using kubernetes version:v1.9.0 [init] using Authorization modes: [Node RBAC] [preflight] Running pre-flight
. [WARNING Fileexisting-crictl]: Crictl not found in System path [preflight] starting the Kubelet service [certificates] Gen
Erated CA certificate and key. [Certificates]
Generated Apiserver certificate and key. [Certificates] Apiserver serving cert is signed for DNS names [master Kubernetes kubernetes.default K ubernetes.default.svc.cluster.local] and IPs [10.96.0.1 10.129.6.211] [certificates] generated Apiserve
R-kubelet-client certificate and key. [Certificates]
Generated SA key and public key. [Certificates]
Generated FRONT-PROXY-CA certificate and key. [Certificates]
Generated front-proxy-client certificate and key. [Certificates] Valid certificates and keys now exist in "/etc/kubernetes/pki" [KubeconFig] wrote Kubeconfig file to disk: "admin.conf" [Kubeconfig] wrote Kubeconfig file to disk: "kubelet.conf" [Kubeconfig] W Rote Kubeconfig file to disk: "controller-manager.conf" [Kubeconfig] wrote Kubeconfig file to disk: "Scheduler.conf" [cont Rolplane] wrote Static Pod manifest for component kube-apiserver to "/etc/kubernetes/manifests/kube-apiserver.yaml" [ Controlplane] wrote Static Pod manifest for component Kube-controller-manager to "/etc/kubernetes/manifests/ Kube-controller-manager.yaml "[Controlplane] wrote Static Pod manifest for component Kube-scheduler to"/ Etc/kubernetes/manifests/kube-scheduler.yaml "[Etcd] wrote Static Pod manifest for a local ETCD instance to"/etc/kubernet Es/manifests/etcd.yaml "[Init] waiting for the" Kubelet to boot up the control plane as Static Pods from directory/etc/ku
Bernetes/manifests ". [Init]
This might take a minute or longer if is plane images. [Kubelet-check] It seems like the kubelet isn ' t running or healthy. [Kubelet-check] The HTTP call equal to ' Curl-ssl Http://localhost:10255/healthz ' failed with Error:get Http://localhost:10
255/healthz:dial TCP [:: 1]:10255:getsockopt: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:10255/healthz ' failed with Error:get Http://localhost:10
255/healthz:dial TCP [:: 1]:10255:getsockopt: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:10255/healthz ' failed with Error:get Http://localhost:10
255/healthz:dial TCP [:: 1]:10255:getsockopt: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:10255/healthz/syncloop ' failed with Error:get Http://loc Alhost:10255/healtHz/syncloop:dial TCP [:: 1]:10255:getsockopt: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:10255/healthz/syncloop ' failed with Error:get Http://loc
Alhost:10255/healthz/syncloop:dial TCP [:: 1]:10255:getsockopt: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:10255/healthz/syncloop ' failed with Error:get Http://loc
Alhost:10255/healthz/syncloop:dial TCP [:: 1]:10255:getsockopt: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:10255/healthz ' failed with Error:get Http://localhost:10
255/healthz:dial TCP [:: 1]:10255:getsockopt: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:10255/healthz/syncloop ' failed with Error:get Http://lo
C alhost:10255/healthz/syncloop:dial TCP [:: 1]:10255:getsockopt: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:10255/healthz ' failed with Error:get Http://localhost:10
255/healthz:dial TCP [:: 1]:10255:getsockopt:connection refused.
Unfortunately, an error has occurred:timed out waiting for the condition this error was likely caused by: -The Kubelet is not running-the kubelet are unhealthy due to a misconfiguration of the node in some way (Requir Ed cgroups Disabled)-There is no internet connection, so the Kubelet cannot pull the following control plane IMA GES:-Gcr.io/google_containers/kube-apiserver-amd64:v1.9.0-gcr.io/google_containers/kub E-controller-manager-amd64:v1.9.0-gcr.io/google_containers/kube-scheduler-amd64:v1.9.0 If you are are on a systemd-po
wered system, you can try to troubleshoot the error with the following commands:-' systemctl status Kubelet ' -' Journalctl-xeu kubelet ' couldn ' t initialize a kubernetes cluster [Root@etcd-host1 ~]#
Solution:
Modify the file:
Vi/etc/systemd/system/kubelet.service.d/10-kubeadm.conf
Read as follows:
Then execute:
Kubeadm Reset
And then reinitialize:
Kubeadm Init--kubernetes-version=v1.9.0--POD-NETWORK-CIDR=10.244.0.0/16