<p>I am kubernetes newbie, and I have a basic question</p>

<p>my understanding from <a href="https://kubernetes.io/docs/reference/kubectl/conventions/" rel="nofollow noreferrer">https://kubernetes.io/docs/reference/kubectl/conventions/</a> is , we can generate yaml templates using "kubernetes run" command</p>

<p>But when I tried doing same, it didn't work
<a href="https://i.stack.imgur.com/xcsWO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xcsWO.png" alt="attachment"></a></p>

<p>Not sure if my understanding is wrong or something wrong in my command</p>

<p>You're just missing a few flags.</p>

<p>The command should be </p>

<pre><code>kubectl run &lt;podname&gt; --image &lt;imagename:tag&gt; --dry-run -o yaml --generator=run-pod/v1 
</code></pre>

<p>for example:</p>

<pre><code>kubectl run helloworld --image=helloworld --dry-run -o yaml --generator=run-pod/v1 
</code></pre>
