<p>We are using a node js application along with Kubernetes with auto-scaling.
My requirement is to log a few things wrt the current instance (pod, IP or anything unique for that instance).</p>
<p>Is there any way in the node js and typescript to get such identifiers in the backend application?</p>

<p>The hostname will contain the unique (per namespace) pod name.
So just get the current hostname of the backend and you have a unique identifier.</p>
<p>For example</p>
<pre><code>const os = require(&quot;os&quot;);

const hostName = os.hostname();
</code></pre>
