<p>I have two network interface in my master node -</p>
<blockquote>
<p>192.168.56.118</p>
<p>10.0.3.15</p>
</blockquote>
<p>While doing kubeadm init on master node, I got following command to add workers</p>
<pre><code>kubeadm join --token qr1czu.5lh1nt34ldiauc1u 192.168.56.118:6443 --discovery-token-ca-cert-hash sha256:e5d90dfa0fff67589551559c443762dac3f1e5c7a5d2b4a630e4c0156ad0e16c
</code></pre>
<p>As you can see, it shows 192.168.56.118 IP to connect from worker.
But while executing the same on worker node, I'm getting following error.</p>
<pre><code>[root@k8s-worker ~]# kubeadm join --token qr1czu.5lh1nt34ldiauc1u 192.168.56.118:6443 --discovery-token-ca-cert-hash sha256:e5d90dfa0fff67589551559c443762dac3f1e5c7a5d2b4a630e4c0156ad0e16c
[preflight] Running pre-flight checks
[discovery] Trying to connect to API Server &quot;192.168.56.118:6443&quot;
[discovery] Created cluster-info discovery client, requesting info from &quot;https://192.168.56.118:6443&quot;
[discovery] Requesting info from &quot;https://192.168.56.118:6443&quot; again to validate TLS against the pinned public key
[discovery] Failed to request cluster info, will try again: [Get https://192.168.56.118:6443/api/v1/namespaces/kube-public/configmaps/cluster-info: x509: certificate is valid for 10.96.0.1, 10.0.3.15, not 192.168.56.118]
</code></pre>
<p>I tried with other IP - 10.0.3.15. But it returns connection refused error, despite the fact that the firewall is disabled in master.</p>
<pre><code>[root@k8s-worker ~]# kubeadm join --token qr1czu.5lh1nt34ldiauc1u 10.0.3.15:6443 --discovery-token-ca-cert-hash sha256:e5d90dfa0fff67589551559c443762dac3f1e5c7a5d2b4a630e4c0156ad0e16c
[preflight] Running pre-flight checks
[WARNING Service-Kubelet]: kubelet service is not enabled, please run 'systemctl enable kubelet.service'
[discovery] Trying to connect to API Server &quot;10.0.3.15:6443&quot;
[discovery] Created cluster-info discovery client, requesting info from &quot;https://10.0.3.15:6443&quot;
[discovery] Failed to request cluster info, will try again: [Get https://10.0.3.15:6443/api/v1/namespaces/kube-public/configmaps/cluster-info: dial tcp 10.0.3.15:6443: connect: connection refused]
</code></pre>
<p>How can I force the certificate to make 192.168.56.118 as valid? or any idea how can I resolve this issue?</p>

smc
<p>You need to provide extra apiserver certificate SAN (<code>--apiserver-cert-extra-sans &lt;ip_address&gt;</code>) and api server advertise address(<code>--apiserver-advertise-address</code>) while initialising the cluster using <code>kubeadm init</code>. Your kubeadm init command will look like: </p>

<pre><code>kubeadm init --apiserver-cert-extra-sans 192.168.56.118 --apiserver-advertise-address 192.168.56.118
</code></pre>

<p>Once, you initialise cluster with above command you will not face the issue of certificates while joining the cluster</p>
