Error Messages:
[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. [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. [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. Unfortunately, an error has occurred: timed out waiting for the condition This error is likely caused by: - The kubelet is not running - The kubelet is unhealthy due to a misconfiguration of the node in some way (required cgroups disabled) If you are on a systemd-powered system, you can try to troubleshoot the error with the following commands: - 'systemctl status kubelet' - 'journalctl -xeu kubelet' Additionally, a control plane component may have crashed or exited when started by the container runtime. To troubleshoot, list all containers using your preferred container runtimes CLI. Here is one example how you may list all Kubernetes containers running in docker: - 'docker ps -a | grep kube | grep -v pause' Once you have found the failing container, you can inspect its logs with: - 'docker logs CONTAINERID' error execution phase wait-control-plane: couldn't initialize a Kubernetes cluster
Use the command to find the startup error reason:
systemctl status kubelet -l
kubelet.service - kubelet: The Kubernetes Node Agent Loaded: loaded (/usr/lib/systemd/system/kubelet.service; enabled; vendor preset: disabled) Drop-In: /usr/lib/systemd/system/kubelet.service.d └─10-kubeadm.conf Active: activating (auto-restart) (Result: exit-code) since 四 2022-04-14 19:12:05 CST; 7s ago Docs: https://kubernetes.io/docs/ Process: 4796 ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS $KUBELET_KUBEADM_ARGS $KUBELET_EXTRA_ARGS (code=exited, status=1/FAILURE) Main PID: 4796 (code=exited, status=1/FAILURE) 4月 14 19:12:05 K8SMASTER01 systemd[1]: kubelet.service: main process exited, code=exited, status=1/FAILURE 4月 14 19:12:05 K8SMASTER01 kubelet[4796]: E0414 19:12:05.862353 4796 server.go:294] "Failed to run kubelet" err="failed to run Kubelet: misconfiguration: kubelet cgroup driver: \"systemd\" is different from docker cgroup driver: \"cgroupfs\"" 4月 14 19:12:05 K8SMASTER01 systemd[1]: Unit kubelet.service entered failed state. 4月 14 19:12:05 K8SMASTER01 systemd[1]: kubelet.service failed.
Solution:
[root@K8SMASTER01 ~]# cat > /etc/docker/daemon.json <<EOF
> {"exec-opts": ["native.cgroupdriver=systemd"]}
> EOF
[root@K8SMASTER01 ~]# systemctl restart docker
Read More:
- [Solved] K8s Initialize Error: failed with error: Get “http://localhost:10248/healthz“
- [Solved] Ubuntu 20.04 LTS Install k8s Error: The connection to the server localhost:8080 was refused
- How to Solve kubelet starts error (k8s Cluster Restarted)
- k8s kubernetes ingress error: endpoints “default-http-backend“ not found
- [Solved] k8s Error: Back-off restarting failed container
- K8S Master Initialize Error: [ERROR CRI]: container runtime is not running: output: E0812
- K8s initializing the master & worker node error [How to Solve]
- [Solved] K8s cluster build error: error: kubectl get csr No resources found.
- K8s Install Error: Error: unknown flag: –experimental-upload-certs
- K8s ❉ Error: cannot be handled as a** [How to Solve]
- How to Solve k8s Nodal issues: /sys/fs/cgroup/memory/docker: no space left on device\““: unknown.
- [Solved] Upstream connect error or disconnect occurs after the k8s istio virtual machine is restarted
- [Solved] k8s error retrieving resource lock default/fuseim.pri-ifs: Unauthorized
- K8s cluster initialization error: Port 6443 is in use [Solved]
- Springcloud configuration center client 3355 startup Error: error on get request for“ http://localhost:8761/eureka/apps/ “: Connection
- K8S error validating data: ValidationError(Deployment.spec): missing required field selector
- [Solved] K8s Error: ERROR: Unable to access datastore to query node configuration
- Rabbitmq failed to stop normally: ERROR: node with name “rabbit” already running on “localhost”
- [Solved] git error: RPC failed; curl 56 Recv failure:Connection was resetB/s
- [Solved] failed to req API:localhost:8848/nacos/v1/ns/instance. code:500 msg: java.net.ConnectException