<p>It is possible to pass some ENV variables to the pod via the <code>--env</code> option of <code>kubectl run</code>, for example:</p>
<pre><code>kubectl run -ti --rm test --image=busybox --env location=city --env time=morning --namespace default -- sh
</code></pre>
<p>I would like to send all the present ENV variables to the pod without specifying all of them the via <code>--env</code>, especially for those that I might not know the variable name. Is there an way to do so? Thanks</p>

imriss
<p>You could try something like this:</p>
<pre><code>kubectl run -ti --rm test --image=busybox $(printenv | xargs -I % echo '--env' &quot;%&quot; | tr '\n' ' ') --namespace default -- sh
</code></pre>
