Scaling a Deployment is all about one number: replicas. Bump it up to run more pods, drop it to zero to stop them. Here’s how.
Scale down
Set replicas to 0 and the pods go away:
kubectl scale deployment my-app --replicas 0
Scale up
Set it back to 1 (or more) to bring them back:
kubectl scale deployment my-app --replicas 1
Do it for every deployment at once
Need to scale a bunch of them? Wrap it in a simple loop. This one scales down every deployment in the default namespace:
for i in `kubectl get deployment -o name`; do kubectl scale $i --replicas 0; done;