Kubernetes Master Worker Node Kubeadm Join issue

4/19/2019

I am installing Kubernetes on Oracle Virtualbox in my laptop using Kubeadm . Everything worked fine till i run this command on Kuberenets Worker node to join with Master node I got the error after running

sudo kubeadm join 192.168.56.100:6443 --token 0i2osm.vsp2mk63v1ypeyjf     --discovery-token-ca-cert-hash sha256:18511321fcc4b622628dd1ad2f56dbdd319bf024740d58127818720828cc7bf0

Error

[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/
error execution phase preflight: [preflight] Some fatal errors occurred:
        [ERROR DirAvailable--etc-kubernetes-manifests]: /etc/kubernetes/manifests is not empty
        [ERROR FileAvailable--etc-kubernetes-kubelet.conf]: /etc/kubernetes/kubelet.conf already exists
        [ERROR Port-10250]: Port 10250 is in use
        [ERROR FileAvailable--etc-kubernetes-pki-ca.crt]: /etc/kubernetes/pki/ca.crt already exists
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`

I tried deleting files manually and ran the command again but it didnt resolve the port issue . and whenever i stop the kubectl which is running on 10250 port and then run the command it gives error to " kubectl needs to be started and when i start the kubectl then it gives error for port 10250 is in use "

Its a kind of chicken and egg thing

Any views on how i can resolve it ?

-- Vidya Sawanny
installation
kubernetes
master
virtualbox
worker

1 Answer

4/20/2019

you should first try

 #kubeadm reset 

because you already have kubernetes it gets error.

-- yasin lachini
Source: StackOverflow