<p>I would like <code>kubectl config get-contexts</code> to show all, or any arbitrary subset, of the columns shown in default output.</p>
<p>Currently, <code>kubectl config get-contexts</code> shows <code>CURRENT NAME CLUSTER AUTHINFO</code> and <code>NAMESPACE</code>. On my terminal, that's a total of 221 columns, with <code>NAME</code>, <code>CLUSTER</code>, and <code>AUTHINFO</code> being identical for all contexts.</p>
<p><code>kubectl config get-contexts</code> documentation shows only one output option: <code>-o=name</code>. Attempts to override this with <code>-o=custom-columns=&quot;CURRENT:.metadata.current,NAME:.metadata.name&quot;</code> (for example) result in an error.</p>
<p>Am I doing something wrong or is the <code>custom-columns</code> option that is common to <code>kubectl get</code> a missing feature?</p>
<p><strong>Update:</strong> maintainers decided that there was no clean way of implementing output options; see <a href="https://github.com/kubernetes/kubectl/issues/1052" rel="nofollow noreferrer">https://github.com/kubernetes/kubectl/issues/1052</a></p>

<p>As indicated by the error message:</p>
<pre><code>error: output must be one of '' or 'name'
</code></pre>
<p>and described in <a href="https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#-strong-getting-started-strong-" rel="nofollow noreferrer">the docs</a>:</p>
<pre><code>output  o       Output format. One of: name
</code></pre>
<p>only the value of <code>name</code> can be used with the <a href="https://kubernetes.io/docs/reference/kubectl/overview/#custom-columns" rel="nofollow noreferrer">custom-columns</a> option for <code>kubectl config get-contexts</code>.</p>
<p>The other option that you have left is to list the current context with:</p>
<pre><code>kubectl config current-context 
</code></pre>
