<p>If I ssh into a Kubernetes node, how do I figure out the UUID for the node so I can query the master API for information specific to the node?</p>

<p>Tried this so far</p>

<pre><code>root     13020  2.5  1.0 410112 41660 ?        Ssl  Jan25  26:04 /usr/bin/kubelet --logtostderr=true --v=0 --api_servers=http://10.32.140.181:8080 --address=0.0.0.0 --port=10250 --allow_privileged=false --maximum-dead-containers=1 --max-pods=14

[achang@p3dlwsbkn50d51 ~]$ curl -Gs http://localhost:10255/pods/
404 page not found
</code></pre>

<p>I found current kubernetes node (I check minikube, gke node pool) has file <code>/etc/machine-id</code>, which <code>cat /etc/machine-id</code> is unique for each kubernetes nodes and match with correspond <code>kubectl get nodes -o json | jq -r .items[].status.nodeInfo.machineID</code>. </p>

<p>because it does not need API invocation, I think this way is easier to combine with shell or container. </p>
