kubelet-check Initial timeout of 40s passed

0 votes

Hello,

          I'm getting and error message while installing kubernetes on Ubuntu following the documentation mentioned here https://www.howtoforge.com/how-to-deploy-nginx-on-kubernetes-cluster-on-ubuntu-1804/. The complete error message says as follows:

root@evuser-ThinkPad-T430:/home/evuser/Dockernginx# kubeadm init --pod-network-cidr=192.168.0.0/16 --apiserver-advertise-address=192.168.31.137[init] Using Kubernetes version: v1.15.2
[preflight] Running pre-flight checks
[WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/
[WARNING SystemVerification]: this Docker version is not on the list of validated versions: 19.03.1. Latest validated version: 18.09
[preflight] Pulling images required for setting up a Kubernetes cluster
[preflight] This might take a minute or two, depending on the speed of your internet connection
[preflight] You can also perform this action in beforehand using 'kubeadm config images pull'

[kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env"
[kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml"
[kubelet-start] Activating the kubelet service
[certs] Using certificateDir folder "/etc/kubernetes/pki"
[certs] Generating "ca" certificate and key
[certs] Generating "apiserver" certificate and key
[certs] apiserver serving cert is signed for DNS names [evuser-thinkpad-t430 kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local] and IPs [10.96.0.1 192.168.31.137]
[certs] Generating "apiserver-kubelet-client" certificate and key
[certs] Generating "front-proxy-ca" certificate and key
[certs] Generating "front-proxy-client" certificate and key
[certs] Generating "etcd/ca" certificate and key
[certs] Generating "etcd/server" certificate and key
[certs] etcd/server serving cert is signed for DNS names [evuser-thinkpad-t430 localhost] and IPs [192.168.31.137 127.0.0.1 ::1]
[certs] Generating "etcd/healthcheck-client" certificate and key
[certs] Generating "etcd/peer" certificate and key
[certs] etcd/peer serving cert is signed for DNS names [evuser-thinkpad-t430 localhost] and IPs [192.168.31.137 127.0.0.1 ::1]
[certs] Generating "apiserver-etcd-client" certificate and key
[certs] Generating "sa" key and public key
[kubeconfig] Using kubeconfig folder "/etc/kubernetes"
[kubeconfig] Writing "admin.conf" kubeconfig file
[kubeconfig] Writing "kubelet.conf" kubeconfig file
[kubeconfig] Writing "controller-manager.conf" kubeconfig file
[kubeconfig] Writing "scheduler.conf" kubeconfig file
[control-plane] Using manifest folder "/etc/kubernetes/manifests"
[control-plane] Creating static Pod manifest for "kube-apiserver"
[control-plane] Creating static Pod manifest for "kube-controller-manager"
[control-plane] Creating static Pod manifest for "kube-scheduler"
[etcd] Creating static Pod manifest for local etcd in "/etc/kubernetes/manifests"
[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.

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, e.g. docker.
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

After which I did check the kubelet services and it said as mentioned here.

root@evuser-ThinkPad-T430:/home/evuser/Dockernginx# systemctl status kubelet
● kubelet.service - kubelet: The Kubernetes Node Agent
Loaded: loaded (/lib/systemd/system/kubelet.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/kubelet.service.d
└─10-kubeadm.conf
Active: active (running) since Tue 2019-08-06 09:18:54 IST; 5min ago
Docs: https://kubernetes.io/docs/home/
Main PID: 24202 (kubelet)
Tasks: 23
Memory: 51.3M
CPU: 9.894s
CGroup: /system.slice/kubelet.service
└─24202 /usr/bin/kubelet --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf --c

Aug 06 09:24:27 evuser-ThinkPad-T430 kubelet[24202]: E0806 09:24:27.726959 24202 kubelet.go:2248] node "evuser-thinkpad-t430" not found
Aug 06 09:24:27 evuser-ThinkPad-T430 kubelet[24202]: E0806 09:24:27.827159 24202 kubelet.go:2248] node "evuser-thinkpad-t430" not found
Aug 06 09:24:27 evuser-ThinkPad-T430 kubelet[24202]: E0806 09:24:27.927439 24202 kubelet.go:2248] node "evuser-thinkpad-t430" not found
Aug 06 09:24:28 evuser-ThinkPad-T430 kubelet[24202]: E0806 09:24:28.027780 24202 kubelet.go:2248] node "evuser-thinkpad-t430" not found
Aug 06 09:24:28 evuser-ThinkPad-T430 kubelet[24202]: E0806 09:24:28.128013 24202 kubelet.go:2248] node "evuser-thinkpad-t430" not found
Aug 06 09:24:28 evuser-ThinkPad-T430 kubelet[24202]: E0806 09:24:28.228266 24202 kubelet.go:2248] node "evuser-thinkpad-t430" not found
Aug 06 09:24:28 evuser-ThinkPad-T430 kubelet[24202]: E0806 09:24:28.328504 24202 kubelet.go:2248] node "evuser-thinkpad-t430" not found
Aug 06 09:24:28 evuser-ThinkPad-T430 kubelet[24202]: E0806 09:24:28.428718 24202 kubelet.go:2248] node "evuser-thinkpad-t430" not found
Aug 06 09:24:28 evuser-ThinkPad-T430 kubelet[24202]: E0806 09:24:28.529010 24202 kubelet.go:2248] node "evuser-thinkpad-t430" not found
Aug 06 09:24:28 evuser-ThinkPad-T430 kubelet[24202]: E0806 09:24:28.629227 24202 kubelet.go:2248] node "evuser-thinkpad-t430" not found

Now, I'm want to know if I do this "kubeadm init --pod-network-cidr=192.168.0.0/16 --apiserver-advertise-address=192.168.31.137 --ignore-preflight-errors=

[Courtesy: https://www.edureka.co/community/19089/error-while-doing-kubernetes-init-command].

Aug 6, 2019 in Kubernetes by nmentityvibes
• 420 points

edited Aug 6, 2019 by Kalgi 10,463 views
I've done the following

kubeadm init --pod-network-cidr=192.168.0.0/16 --apiserver-advertise-address=192.168.31.137 --ignore-preflight-errors=

kubeadm reset

this resulted in "[kubelet-check] Initial timeout of 40s passed." and I'm getting the same error message. I have also tried reinstalling the packages and following the documentation mentioned here https://www.edureka.co/blog/install-kubernetes-on-ubuntu. But it did not help.

Hii @nmentityvibes, Firstly, check if all your containers are running as required. Use the following command for the same:

docker ps -a | grep kube

Secondly, if you're trying to reset the entire system, then execute the 

kubeadm reset  and then kubeadm init.

Also, can you tell me what CNI are you using? What Ubuntu version are you trying to run this on? I am assuming 18.04 based on the tutorial you're following.
You init command runs a few preflight checks(checks to validate system state before letting kubeadm make changes)

If using --ignore-preflight-errors does not change your output, then it's not the system state fault and you're going wrong somewhere else.

I will try running the same from my end but I need you to tell me the CNI and the ubuntu version that you are using.
I've checked the services that are running as mentioned here.

root@evuser-ThinkPad-T430:/home/evuser# docker service ls
ID                  NAME                MODE                REPLICAS            IMAGE                             PORTS
5qxati7h2ppm        devtest-service     replicated          4/4                 nginx:latest                      
loi3dxmn856s        getstartedlab_web   replicated          5/5                 nmentityvibes/get-started:part2   *:4000->80/tcp

root@evuser-ThinkPad-T430:/home/evuser# docker service rm devtest-service
devtest-service

root@evuser-ThinkPad-T430:/home/evuser# docker service ls
ID                  NAME                MODE                REPLICAS            IMAGE                             PORTS
loi3dxmn856s        getstartedlab_web   replicated          5/5                 nmentityvibes/get-started:part2   *:4000->80/tcp

It did not help. Should I be removing "getstartedlab_web" also?
Yes, remove getstartedlab_web also, if you wish to reset everything and start from scratch.

Also, did you execute "systemctl start kubelet" before the init command?
I did reinstall the same following the blog mentioned here https://www.edureka.co/blog/install-kubernetes-on-ubuntu on a virtual machine, but there is a new issue that I am not able to fix which is related to the dashboard. Should I log in the kubernetes-dashboard container to solve the problem accessing it and execute some Jason commands to make it available?
Alright, if you are getting issues while creating the dashboard, I am assuming that you have created the cluster and joined your nodes to the cluster.

What error are you getting with the dashboard?

Even I faced a lot of issues the first time I created a Kube cluster.

This is the result of the my kublet pod namespace containers and I'm getting no response while accessing this URL: http://192.168.31.198:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/

Here are screenshot images while trying to access it. I've tried installing apache on the kubernetes machine and it worked but I'm not able to access this. Help me with a checklist to access the GUI[graphical user interface].

This message I receive when try to access "192.168.31.198:6443" while trying to join on http and not using "kubeadm join 192.168.31.198:6443 --token gdn12c.i1krjuiaphlaxtwk --discovery-token-ca-cert-hash sha256:6b493c7fea20bb34834f9a1dcf4405130411c70730bf4bf5a0adeb7088966f44". Help me if this is possible or just ignore this one.

Hey @nmentityvibes, can you post the output of kubectl get pods in text format? The image is very blurry to read.

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Kubernetes

0 votes
1 answer

what is the impact of uprading kubelet if we leave the pods on the worker nodes?

Restarting kubelet, which has to happen for ...READ MORE

answered Jul 18, 2019 in Kubernetes by Sirajul
• 59,230 points
3,233 views
0 votes
1 answer

Getting the pod's ip address for the container inside of it

You can make sure that the replication ...READ MORE

answered Aug 24, 2018 in Kubernetes by DareDev
• 6,890 points
2,353 views
0 votes
2 answers

The Status of nodes shown unknown

This worked for me In Azure, if you ...READ MORE

answered Aug 30, 2018 in Kubernetes by Nilesh
• 7,050 points
2,004 views
0 votes
1 answer

Unable to get cgroup stats for docker and kubelet services

Try and start kubelet with the following ...READ MORE

answered Sep 3, 2018 in Kubernetes by DareDev
• 6,890 points
4,645 views
0 votes
1 answer

Spark job using kubernetes instead of yarn

I should be in the format of ...READ MORE

answered Sep 6, 2018 in Kubernetes by Kalgi
• 52,360 points
784 views
0 votes
2 answers
+1 vote
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17, 2019 in Others by anonymous
14,523 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP