<p>I need to get the metadata-&gt;labels-&gt;app.kubernetes.io/version value from my pods.  But I can't seem to find the <code>jsonpath</code> that will allow the label key to have the slash and periods.</p>
<p>I have a basic command that is working:  <code>kubectl get pods -o=jsonpath=&quot;{range .items[*]}{.metadata.name}{end}&quot; -A</code>.  This successfully returns name of each pods.</p>
<p>I have modified this to try to get the version.  Here are the permutations that I have attempted (each has failed):</p>
<pre><code>kubectl get pods -o=jsonpath=&quot;{range .items[*]}{.metadata.labels.app.kubernetes.io/version}{end}&quot; -A
</code></pre>
<p>and</p>
<pre><code>kubectl get pods -o=jsonpath=&quot;{range .items[*]}{.metadata.labels.'app.kubernetes.io/version'}{end}&quot; -A
</code></pre>
<p>and</p>
<pre><code>kubectl get pods -o=jsonpath=&quot;{range .items[*]}{.metadata.labels.`&quot;app.kubernetes.io`/version`&quot;}{end}&quot; -A
</code></pre>
<p><strong>How can I get the version using <code>jsonpath</code>?</strong></p>
<p>I am running in Windows PowerShell if that matters</p>

Vaccano
<p>Escape dots in key name:</p>
<pre><code>.metadata.labels.app\.kubernetes\.io/version
</code></pre>
<pre><code>kubectl get pods -o=jsonpath=&quot;{range .items[*]}{.metadata.labels.app\.kubernetes\.io/version}{end}&quot; -A
</code></pre>
