<p>I have to scale up and down in one go nearly 200 microservices in my environment is there a possible way to automate scale up and scale down through a script.</p>

dev
<p>While using xargs or parallel or something might work. I suggest using command substitution or similar means, as much as possible, to give Kubernetes right away a list of objects.</p>
<p>For example, you can try the below, which does a dry-run but shows you want would be scaled.</p>
<pre><code>kubectl scale --replicas 2 $(kubectl get deploy -o name) --dry-run=client
</code></pre>
<p>The list of deployments, could come also from a text file or somewhere else.</p>
