<p>I use <code>kubectl</code> to list Kubernetes custom resources of a kind <code>mykind</code> with an additional table column <code>LABEL</code> that contains the value of a label <code>a.b.c.com/key</code> if present:</p>
<pre><code>kubectl get mykind -o=custom-columns=LABEL:.metadata.labels.'a\.b\.c\.com/key'
</code></pre>
<p>This works, i.e., the label value is properly displayed.</p>
<p>Subsequently, I wanted to add a corresponding additional printer column to the custom resource definition of <code>mykind</code>:</p>
<pre><code>- description: Label value
  jsonPath: .metadata.labels.'a\.b\.c\.com/key'
  name: LABEL
  type: string
</code></pre>
<p>Although the additional column is added to <code>kubectl get mykind</code>, it is empty and no label value is shown (in contrast to above <code>kubectl</code> command). My only suspicion were problems with escaping of the special characters - but no variation helped.</p>
<p>Are you aware of any difference between the JSON path handling in <code>kubectl</code> and additional printer columns? I expected strongly that they are exactly the same.</p>

<p>mdaniel's comment works!</p>
<pre class="lang-yaml prettyprint-override"><code>- description: Label value
  jsonPath: '.metadata.labels.a\.b\.c\.com/key'
  name: LABEL
  type: string
</code></pre>
<p>You need to use <code>\.</code> instead of <code>.</code> and use single quotes <code>' '</code>. It doesn't work with double quotes for the reasons I don't understand</p>
