<p>I am using eks to deploy pods to my nodegroups. This is my deployment file</p>
<pre><code>
 apiVersion: apps/v1
 kind: Deployment
 metadata:
   name: molding-app
   namespace: new-simulator
 spec:
   replicas: 3
   selector:
     matchLabels:
       app: my-app
   template:
     metadata:
       labels:
         app: my-app
     spec:
       containers:
       - name: eks-pods
         image: 088562811725.dkr.ecr.ap-south-1.amazonaws.com/eks_pods:latest
         ports:
         - containerPort: 8080
         - containerPort: 10010



</code></pre>
<p>I just wanted to know if there is anyway I could pass number of replicas through command line instead of writing it in the deployment file?</p>

<p>You can scale it from command line by using</p>
<pre><code>kubectl scale deployment molding-app --replicas=3 -n namespace
</code></pre>
