<p>I have setup the Kubernetes cluster  with <a href="https://github.com/kubernetes-sigs/kubespray" rel="nofollow noreferrer">Kubespray</a>
<a href="https://i.stack.imgur.com/bLcYE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bLcYE.png" alt="enter image description here" /></a></p>
<p>Once I restart the node and check the status of the node I am getting as below</p>
<pre class="lang-bash prettyprint-override"><code>$ kubectl get nodes
  The connection to the server 127.0.0.1:6443 was refused - did you specify the right host or port?
</code></pre>
<p><a href="https://i.stack.imgur.com/adOC2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/adOC2.png" alt="enter image description here" /></a></p>
<hr />
<p>Environment:</p>
<pre class="lang-bash prettyprint-override"><code>OS : CentOS 7
Kubespray
kubelet version: 1.22.3
</code></pre>
<p>Need your help on this.</p>
<p>Regards,
Zain</p>

<p>This work for me, I'm using minukube,</p>
<p>When checking the minikube status by running the command <code>minikube status</code> you'll probably get something like that</p>
<pre><code>    E0121 07:14:19.882656    7165 status.go:415] kubeconfig endpoint: got: 
    127.0.0.1:55900, want: 127.0.0.1:49736

    type: Control Plane
    host: Running
    kubelet: Stopped
    apiserver: Stopped
    kubeconfig: Misconfigured
</code></pre>
<p>To fix it, I just followed the next steps:</p>
<ol>
<li><code>minikube update-context</code></li>
<li><code>minukube start</code></li>
</ol>
