kubeadm join command fails due to possibly incorrect preflight check

11/17/2016

I recently set up a kubernetes cluster on AWS (EC2 Classic).

I followed this documentation: http://kubernetes.io/docs/getting-started-guides/kubeadm/

When it came to joining my slaves to my cluster, the kubeadm join command failed with:

Running pre-flight checks
preflight check errors:
    /var/lib/kubelet is not empty

As far as I understand it, all nodes need to have the kubelet installed. I think this is a bugged preflight check (https://github.com/kubernetes/kubernetes/issues/36987). How do I get around it to join my node to my cluster?

-- ndtreviv
kubeadm
kubernetes

2 Answers

3/10/2019

It would be safe to installed kubeadm on all the machines as now it installed kubectl, kubelet as well along with kubeadm....

then try to run your command. Please ensure whatever version of kubelet you are running it should be compatible for kubeadm running on master machine...

-- Abhishek Jain
Source: StackOverflow

11/17/2016

There is a flag to skip the preflight checks:

kubeadm join --skip-preflight-checks --token=TOKEN MASTER_IP
-- ndtreviv
Source: StackOverflow