<p>By default, <code>kubectl get pods</code> outputs</p>

<pre><code>NAME                                                              READY   STATUS         RESTARTS   AGE
my-podob-6f7f9d798c-grhmd                                       1/1     Running        0          6d17h
</code></pre>

<p>Now I'd like to add a few extra columns to this, so I've set up a template.txt file with:</p>

<pre><code>NAME          IMAGES
metadata.name metadata.annotations.imageTag
</code></pre>

<p>I can't seem to figure out how <code>READY</code> is calculated from the output.  Ideally, I would append to the <code>get pods</code> output with a few custom columns but I can't tell if that's possible.</p>

<p>There is a FR for appending extra columns <a href="https://github.com/kubernetes/kubernetes/issues/71612" rel="nofollow noreferrer">here</a>.</p>

<p>The "READY" column is a special case in the source: <a href="https://github.com/kubernetes/kubernetes/blob/master/pkg/printers/internalversion/printers.go#L558" rel="nofollow noreferrer">printers.go#L558</a> and its value is calculated in the implementation.</p>

<p>Unfortunately it seems that it's impossible to "count things" both in JSONPath and Go templates.</p>

<p>Maybe consider creating an alias to run the ordinary <code>kubectl get pods</code> and then the one with your custom columns?</p>
