<p>I'm trying to make a list of all deployments' variables in kubernetes cluster with kubectl command. I'm doing something like</p>
<pre><code>kubectl get deploy --all-namespaces -o custom-columns='NAME:metadata.name,ENV:spec.template.spec.containers.env.name'
</code></pre>
<p>but something always go wrong. How should I write kubectl command to get table of deployments and their variables with values?</p>

cusl
<p>Here is the right command:</p>
<pre><code>kubectl get deploy --all-namespaces -o custom-columns='NAME:metadata.name,ENV:spec.template.spec.containers[*].env[*].name'
</code></pre>
