<p>Consider following expression</p>
<pre><code>kubectl get deploy -o 'jsonpath={.items[*].apiVersion}'
</code></pre>
<p>It returns following output:</p>
<pre><code>apps/v1 apps/v1
</code></pre>
<p>When using exactly the same expression with custom-columns:</p>
<pre><code>kubectl get deploy -o 'custom-columns=A:{.items[*].apiVersion}'
</code></pre>
<p>I get:</p>
<pre><code>A
&lt;none&gt;
&lt;none&gt;
</code></pre>
<p>What am I doing wrong?</p>

<p>Actually the case you are testing is kind of misleading. Because both <code>Deployment</code> and <code>DeploymentList</code> have the same apiVersion (<code>apps/v1</code>).
So let's work on <code>.metadata.name</code> for example:</p>
<pre><code>kubectl -n kube-system get deploy -o 'jsonpath={.items[*].metadata.name}'
</code></pre>
<p>You will get a result like this:</p>
<pre><code>calico-kube-controllers coredns dns-autoscaler kubernetes-dashboard metrics-server rbd-provisioner
</code></pre>
<p>But for custom column it is somehow different. Table is for showing a list of content. So the path you provide is for each row of the table. so you should use:</p>
<pre><code>kubectl -n kube-system get deploy -o 'custom-columns=A:{.metadata.name}'
</code></pre>
<p>And you will get the correct result:</p>
<pre><code>A
calico-kube-controllers
coredns
dns-autoscaler
kubernetes-dashboard
metrics-server
rbd-provisioner
</code></pre>
<p>So the problem was with using <code>items[*]</code> on <code>custom-columns</code>.</p>
