<p>My environment:</p>

<p>CentOS7 linux</p>

<p><strong>/etc/hosts:</strong></p>

<p>192.168.0.106 master01</p>

<p>192.168.0.107 node02</p>

<p>192.168.0.108 node01</p>

<p>On master01 machine:</p>

<p><strong>/etc/hostname:</strong></p>

<p>master01</p>

<p>On master01 machine I execute commands as follows:</p>

<p>1)yum install docker-ce kubelet kubeadm kubectl </p>

<p>2)systemctl start docker.service</p>

<p>3)vim /etc/sysconfig/kubelet</p>

<p>EDIT the file:</p>

<p>KUBELET_EXTRA_ARGS="--fail-swap-on=false"</p>

<p>4)systemctl enable docker kubelet</p>

<p>5)kubeadm init --kubernetes-version=v1.12.0 --pod-network-cidr=10.244.0.0/16 servicecidr=10.96.0.0/12 --ignore-preflight-errors=all</p>

<p>THEN</p>

<p>The first error message: </p>

<p><strong>unable to load client CA file /etc/kubernetes/pki/ca.crt: open /etc/kubernetes/pki/ca.crt: no such file or directory</strong></p>

<p>kubelet.go:2236] node "master01" not found</p>

<p>kubelet_node_status.go:70] Attempting to register node master01
Oct  2 23:32:35 master01 kubelet: E1002 23:32:35.974275   49157 </p>

<p>kubelet_node_status.go:92] Unable to register node "master01" with API server: Post <a href="https://192.168.0.106:6443/api/v1/nodes" rel="nofollow noreferrer">https://192.168.0.106:6443/api/v1/nodes</a>: dial tcp 192.168.0.106:6443: connect: connection refused</p>

<p>l don't know why node master01 not found?</p>

<p>l have tried a lot of ways but can't solve the problem.</p>

<p>Thank you!</p>

朱可凡
<p>Your issue also might be caused by firewall rules, restricting tcp connection to 6443 port.
So you can temporary disable firewall on master node to validate this:</p>

<pre><code>systemctl stop firewalld
</code></pre>

<p>and then try to perform kubeadm init once again.
Hope it helps.</p>
