Kubernetes installing fails on Debian 9

2/14/2018

I am trying to install Kubernetes on my Debian 9 machine. I did anything that official document said. + +

I give some errors when I ran kubeadm init :

[init] Using Kubernetes version: v1.9.3
[init] Using Authorization modes: [Node RBAC]
[preflight] Running pre-flight checks.
    [WARNING FileExisting-crictl]: crictl not found in system path
[preflight] Some fatal errors occurred:
    [ERROR Port-10251]: Port 10251 is in use
[preflight] If you know what you are doing, you can make a check non-fatal 
with 
`--ignore-preflight-errors=...`

How Can I fix these errors and install kubeadm ?

-- Meysam Mahmoodi
debian
kubeadm
kubernetes

1 Answer

2/14/2018

[ERROR Port-10251]: Port 10251 is in use

Port 10251 is used by kube-scheduler. Looks like it is not free due to the previous kubernetes installation. Skipping preflight checks won't help here.

I suggest doing the following:

  1. kubeadm reset on all the nodes.
  2. Reboot all the nodes if possible.
  3. kubeadm init <optional arguments> on master.
  4. kubeadm join <arguments> on the worker nodes.
-- Vikram Hosakote
Source: StackOverflow