<p>I want to get the MAC address of the host in the POD, the POD network doesn't use hostnetwork. I found that the node UID's suffix is the host' MAC address and I want to find the source where this UID value get from?</p>

<p>The suffix of uid (525400a9edd3) is the MAC address(ether 52:54:00:a9:ed:d3) of that host?</p>

<pre><code>kubectl get nodes node1 -o yaml
apiVersion: v1
kind: Node
metadata:
...
  uid: 96557f0f-fea6-11e8-b826-525400a9edd3
...
</code></pre>

<pre><code>ifconfig eth0
        eth0: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt;  mtu 1500
        inet 172.16.68.1  netmask 255.255.0.0  broadcast 172.16.255.255
        inet6 fe80::5054:ff:fea9:edd3  prefixlen 64  scopeid 0x20&lt;link&gt;
        ether 52:54:00:a9:ed:d3  txqueuelen 1000  (Ethernet)
</code></pre>

<p>Could you help me to find how node uid is created accros the source code?</p>

<p>I want to know the host MAC address in kubernetes pod where that pod runing on.</p>

toper
<p>Pods are likely running within a node.</p>
<p>To get the node MAC address run arp NodeName on your controlplane node:</p>
<p>Start by getting the list of nodes and their names</p>
<pre><code>kubectl get nodes -owide

root@controlplane:~# k get nodes -owide
NAME           STATUS   ROLES                  AGE   VERSION   INTERNAL-IP   EXTERNAL-IP   OS-IMAGE             KERNEL-VERSION   CONTAINER-RUNTIME
controlplane   Ready    control-plane,master   35m   v1.20.0   10.4.57.3     &lt;none&gt;        Ubuntu 18.04.5 LTS   5.4.0-1057-gcp   docker://19.3.0
node01         Ready    &lt;none&gt;                 35m   v1.20.0   10.4.57.6     &lt;none&gt;        Ubuntu 18.04.5 LTS   5.4.0-1057-gcp   docker://19.3.0
</code></pre>
<p>Run arp NODENAME (on the controlplane) to get the MAC address of the node you want. In this case, we are getting the MAC address for node01.</p>
<pre><code>arp node01
</code></pre>
<p>Output</p>
<pre><code>root@controlplane:~# arp node01
Address                  HWtype  HWaddress           Flags Mask            Iface
10.4.57.5                ether   02:42:0a:04:39:04   C                     eth0
</code></pre>
