<p>I used to create deployments quickly using imperative commands</p>

<p><code>kubectl run nginx --image=nginx --restart=Always --port=80 --replicas=3</code>  . </p>

<p>Now run command with deployment seems to have been deprecated.  Is there any other way to do the same with <code>kubectl create</code>... with replicas and ports?</p>

<p>Since the Kubernetes v1.18 the <code>kubectl run</code> will no longer create deployments but pods. </p>

<p>What might be used instead is the imperative option of <code>kubectl create deployment</code>. 
So the following command:</p>

<p><code>k create deploy nginx --image nginx
</code></p>

<p>will do the trick for you. 
It will create Deployment object in imperative way. (No need for intermediate <code>yaml</code> files)   </p>

<pre><code># Run:
kubectl create deploy nginx --image nginx &amp;&amp; kubectl scale deploy nginx --replicas 3

# Check:
kubectl get deploy
NAME                         READY   UP-TO-DATE   AVAILABLE   AGE
nginx                        3/3     3            3           14s

</code></pre>

<p>Note there is no <code>--replicas</code> flag of <code>kubectl create deployemnt</code> so the scaling is controlled separately.</p>
