<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>You can look at any of the solutions posted <a href="https://askubuntu.com/questions/692258/find-mac-address-in-the-filesystem">here</a> to see where you can find the MAC address from your filesystem. Then you simply need to mount that file into your container using a <a href="https://kubernetes.io/docs/concepts/storage/volumes/#hostpath" rel="nofollow noreferrer">hostpath volume</a>, and read the info from there.</p>
