An error occurs when a k8s child node joins the cluster
[preflight] Running pre-flight checks [preflight] Reading configuration from the cluster... [preflight] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -o yaml' [kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml" [kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env" [kubelet-start] Starting the kubelet [kubelet-start] Waiting for the kubelet to perform the TLS Bootstrap... [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 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' failed with error: Get "http://localhost:10248/healthz": dial tcp 127.0.0.1:10248: connect: connection refused.
Try this method: https://github.com/kubernetes/kubeadm/issues/1893
sudo mkdir /etc/docker cat <<EOF | sudo tee /etc/docker/daemon.json { "exec-opts": ["native.cgroupdriver=systemd"], }, } EOF sudo systemctl enable docker sudo systemctl daemon-reload sudo systemctl restart docker
Analyze the reason. The server did not install docker before installing kubelet, which led to this problem
Similar Posts:
- An error is reported when logging into harbor warehouse with docker login of other hosts
- [Solved] http: server gave HTTP response to HTTPS client
- centos ERROR: Couldn’t connect to Docker daemon at http+docker://localhost – is it running?
- Docker compose executes the YML file error [How to Solve]
- [Solved] kuberlet Service Startup Error: “Failed to run kubelet” err=”failed to run Kubelet: misconfiguration: kubelet cgroup driver: \”systemd\” is different from docker cgroup driver: \”cgroupfs\””
- Got permission denied while trying to connect to the Docker daemon socket
- [Solved] Gitlab can clone via SSH, cannot clone via HTTP, and cannot pipeline. Prompt port 80: connection rejected
- Ubuntu20.04 server Error: Failed to restart docker.service: Unit docker.service not found
- Harbor 443 connect connection refused [How to Solve]
- When Docker installs an Mirror: failed to get default registry endpoint from daemon