<p><strong>kubeadm init --apiserver-advertise-address=192.168.56.103 --pod-network-cidr=192.168.0.0/16</strong></p>

<p>getting following error</p>

<pre><code>W0501 02:23:32.828806    8629 configset.go:202] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io]
[init] Using Kubernetes version: v1.18.2
[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 Port-10259]: Port 10259 is in use
    [ERROR Port-10257]: Port 10257 is in use
    [ERROR Port-10250]: Port 10250 is in use
    [ERROR Port-2380]: Port 2380 is in use
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
To see the stack trace of this error execute with --v=5 or higher
</code></pre>

<pre><code>[ERROR Port-10259]: Port 10259 is in use
[ERROR Port-10257]: Port 10257 is in use
[ERROR Port-10250]: Port 10250 is in use
[ERROR Port-2380]: Port 2380 is in use
</code></pre>

<p>Above error shows ports are in use. </p>

<p>In kubernetes </p>

<ul>
<li>10259 => default port for kube-scheduler</li>
<li>10257 => default port for kube-controller-manager </li>
<li>10250 => default port for kubelet</li>
<li>2380 => etcd use this</li>
</ul>

<p>It seems <code>kubeadm init</code> was already called on this node. Run <code>kubeadm reset</code> before running <code>kubeadm init</code> command.</p>

<p>If that does not work for you then you can check which process using those port by running</p>

<pre><code>netstat -lnp | grep 1025
</code></pre>

<p>and you can kill those port by running</p>

<pre><code>sudo fuser -k &lt;port&gt;/tcp
</code></pre>
