<p>This is the output with <code>custom-columns</code></p>
<pre><code>$ kubectl -n web get pod -ocustom-columns=&quot;Name:.metadata.name,Image:.spec.containers[0].image&quot;
Name      Image
mysql-0   myrepo.mydomain.com/mysql:5.7
mysql-1   myrepo.mydomain.com/mysql:5.7
mysql-2   myrepo.mydomain.com/mysql:5.7
</code></pre>
<p>This is the output with <code>jsonpath</code> for single pod</p>
<pre><code>$ kubectl -n web get pod -o jsonpath=&quot;{..metadata.name}:{..spec.containers[0].image}&quot; mysql-0
mysql-0:myrepo.mydomain.com/mysql:5.7
</code></pre>
<p>This is the output with <code>jsonpath</code> for multiple pods</p>
<pre><code>$ kubectl -n web get pod -o jsonpath=&quot;{..metadata.name}:{..spec.containers[0].image}&quot;
mysql-0 mysql-1 mysql-2:myrepo.mydomain.com/mysql:5.7 myrepo.mydomain.com/mysql:5.7 myrepo.mydomain.com/mysql:5.7
</code></pre>
<p>Now how to combine this into a single column or word, something like this, using <code>-ocustom-columns</code> or <code>-ojsonpath</code></p>
<pre><code>mysql-0=myrepo.mydomain.com/mysql:5.7
mysql-1=myrepo.mydomain.com/mysql:5.7
mysql-2=myrepo.mydomain.com/mysql:5.7
</code></pre>

<p>Using kubectl using plain <code>jsonpath</code>:</p>
<pre><code>kubectl get pod -n &lt;namespace&gt; -o jsonpath='{range .items[*]}{.metadata.name}={.spec.containers[*].image}{&quot;\n&quot;}{end}'
</code></pre>
<p>Example:</p>
<pre><code>kubectl get pod -n default -o jsonpath='{range .items[*]}{.metadata.name}={.spec.containers[*].image}{&quot;\n&quot;}{end}'
nginx-0=nginx
nginx-1=nginx
nginx-2=nginx
</code></pre>
<p>Here <code>range</code> feature is used to loop over all the pods:</p>
<pre><code>{range items[*]} ...&lt;LOGIC HERE&gt;... {end}
</code></pre>
<p>Between the range block(As described above), use the <code>jsonpath</code>, notice the <code>=</code> sign is used as per our requirement.</p>
<pre><code>{.metadata.name}={.spec.containers[*].image}{&quot;\n&quot;}
</code></pre>
