<p>I am following this <a href="https://kubernetes.io/docs/getting-started-guides/centos/centos_manual_config/" rel="nofollow noreferrer">tutorial</a> with 2 vms running CentOS7. Everything looks fine (no errors during installation/setup) but I can't see my nodes.</p>

<p>NOTE: </p>

<ul>
<li>I am running this on VMWare VMs</li>
<li>kub1 is my master and kub2 my worker node</li>
</ul>

<p><code>kubectl get nodes</code> output:</p>

<pre><code>[root@kub1 ~]# kubectl cluster-info
Kubernetes master is running at http://kub1:8080

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.

[root@kub2 ~]# kubectl cluster-info
Kubernetes master is running at http://kub1:8080

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
</code></pre>

<p>nodes:</p>

<pre><code>[root@kub1 ~]# kubectl get nodes
[root@kub1 ~]# kubectl get nodes -a
[root@kub1 ~]#

[root@kub2 ~]# kubectl get nodes -a
[root@kub2 ~]# kubectl get no
[root@kub2 ~]#
</code></pre>

<p>cluster events:</p>

<pre><code>[root@kub1 ~]# kubectl get events -a
LASTSEEN   FIRSTSEEN   COUNT     NAME         KIND      SUBOBJECT   TYPE      REASON     SOURCE                    MESSAGE
1h         1h          1         kub2.local   Node                  Normal    Starting   {kube-proxy kub2.local}   Starting kube-proxy.
1h         1h          1         kub2.local   Node                  Normal    Starting   {kube-proxy kub2.local}   Starting kube-proxy.
1h         1h          1         kub2.local   Node                  Normal    Starting   {kubelet kub2.local}      Starting kubelet.
1h         1h          1         node-kub2    Node                  Normal    Starting   {kubelet node-kub2}       Starting kubelet.
1h         1h          1         node-kub2    Node                  Normal    Starting   {kubelet node-kub2}       Starting kubelet.
</code></pre>

<p>/var/log/messages:</p>

<pre><code>kubelet.go:1194] Unable to construct api.Node object for kubelet: can't get ip address of node node-kub2: lookup node-kub2: no such host
</code></pre>

<p>QUESTION: any idea why my nodes are not shown using "kubectl get nodes"?</p>

<p>My issue was that the <code>KUBELET_HOSTNAME</code> on <code>/etc/kubernetes/kubeletvalue</code> didn't match the hostname.</p>

<p>I commented that line, then restarted the services and I could see my worker after that.</p>

<p>hope that helps</p>
