<p>When I do a <code>kubectl get pod pod_name -o yaml</code> I have a field like this.</p>
<pre><code>    - name: MY_NODE_NAME
      valueFrom:
        fieldRef:
          apiVersion: v1
          fieldPath: spec.nodeName
</code></pre>
<p>I wanted to know the value of this <code>MY_NODE_NAME</code>.</p>
<p>Unfortunately, I cannot do a <code>env</code> or <code>exec</code> to my pod. Is there any way to get the value of this reference?</p>

Senthil Kumaran
<blockquote>
<p>I cannot do a env or exec to my pod. Is there any way to get the value of this reference?</p>
</blockquote>
<p>Try:
<code>kubectl get pod &lt;name&gt; --namespace &lt;ns&gt; -o jsonpath='{.spec.nodeName}'</code></p>
