Kubeadm init error


New to the community…

I have been trying to setup kubernetes cluster using kubeadm for the last 2 days … But I always get a failure with kubeadm init


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

The Error on the kubelet service :

Failed to list *v1.Service: ****** dial tcp connect: connection refused
Failed to list *v1.Node: ******** dial tcp connect: connection refused

Unable to update cni config: No networks found in /etc/cni/net.d

Cluster information:

Kubernetes version: 1.15
Cloud being used: Bare Metal
Installation method:
Host OS: Ubuntu 16.04
CNI and version:
CRI and version:

So The kubeadm init never succeeds and subsequent kubeadm reset and kubeadm init returns to the same error.

Do the cni plugins needs to be installed even before the kubeadm init ?

Something funny is definitely going on. Just to try to get an idea of where you are starting, what guide are you following to bootstrap the cluster (assuming kubeadm from kubernetes.io)?

What output do you get when you run kubeadm init <args> and what is the kubeadm command you run (if you can share)?

My initial comment had the output and the error…

However now the issue was fixed after setting the below values in /etc/ufw/sysctl.conf

net/bridge/bridge-nf-call-ip6tables = 1
net/bridge/bridge-nf-call-iptables = 1
net/bridge/bridge-nf-call-arptables = 1

1 Like

awesome glad you got it fixed. I’ve been caught by iptables before too.

1 Like