Kubernetes: "kubeadm init" is hanging

1/16/2018

Whenever I run:

# systemctl start docker
# kubeadm reset
# kubeadm init

it always hangs at the end:

[etcd] Wrote Static Pod manifest for a local etcd instance to "/etc/kubernetes/manifests/etcd.yaml"
[init] Waiting for the kubelet to boot up the control plane as Static Pods from directory "/etc/kubernetes/manifests".
[init] This might take a minute or longer if the control plane images have to be pulled.

Even tried wiping out, reinstalling, etc. but no difference.

I'd appreciate your help in advance!

Thank you.

-- Steve
kubernetes

2 Answers

1/17/2018

As @sfgroups mentioned, this clearly seems to be an issue with kubelet. For some reason it is not starting, so I advise you to run this command

 sudo journalctl -u kubelet

This will provide more info about the issue. I would also check if it is an issue with docker itself. I would try to launch a container and see if it works

  docker run -ti bitnami/mongodb 

I have seen some issue with some kernel updates and docker, so if it fails, then you know that the reason is docker.

-- Javier Salmeron
Source: StackOverflow

5/21/2020

I had the same issue and found that crio was missing a package, no idea why

run journalctl -xeu crio

If you find something such as : crio[5548]: /usr/libexec/crio/conmon: error while loading shared libraries: libglib-2.0.so.0: cannot open shared object file: No such file or directory

If you are using debian you can get the package running:

apt-get install libglib2.0-0

then restart crio : sudo systemctl restart crio

kubeadm reset

kubeadm init

Otherwise check that you are using systemd or cgroupfs accordingly.

-- Alexandre Philibert
Source: StackOverflow