kubectl scale
CautionScale replicas
kubectl scale deploy/<name> --replicas=<n>
Changes a deployment's replica count for load or pausing.
Examples
kubectl scale deploy/web --replicas=0 -n prodTemporarily stop pods
Syntax
kubectl scale deploy/<name> --replicas=<n> -n <ns>
Before you run it
0 replicas effectively stops it.
Related commands
- kubectl rolloutRollout restart/undo
- kubectl get deployList deployments
The same reference, with no signal at all
Every command on this site, held on your device. The app adds 632 more: 1,510 commands and 120 fix flows, searchable with no connection. Free to install, no ads (some content is a one-time purchase).
Get it free on the App Store