<p>I found that creating a yaml object description using <code>--dry-run=client</code> and providing <code>--command</code> only works when the provided arguments are in a very specific order.</p>
<p>This works:</p>
<pre><code>k run nginx --image=nginx --restart=Never --dry-run=client -o yaml --command -- env &gt; nginx.yaml
</code></pre>
<p>This does NOT:</p>
<pre><code>k run nginx --image=nginx --restart=Never --command -- env --dry-run=client -o yaml &gt; nginx.yaml
</code></pre>
<p>I feel a bit confused because the version that does not work looks a lot more intuitive to me then the one that does work. Ideally both should work in my opinion. Is this intended behavior?  I can't find any documentation about it.</p>

<p>Everything after <code>--</code> is a positional argument (until the <code>&gt;</code> which is a shell metachar), not an option.</p>
