kubectl scale

Change replica count

high risk

interactive breakdown — edit the command and press Explain
$ 
⚠ Risks & cautions
Safer / dry-run alternatives
kubectl get deploy/<name> -o jsonpath="{.spec.replicas}"Record the current value
kubectl scale deploy/<name> --replicas=<n> --current-replicas=<old>Use a precondition
What it does

Sets replicas of deployments/statefulsets.

Common flags
FlagMeaning
--replicas --replicasDesired count
--current-replicas --current-replicasPrecondition
Examples
kubectl scale deploy/web --replicas=5Scale up · explain & risk-check →
kubectl scale deploy/web --replicas=0Stop (outage!) · explain & risk-check →
Related
kubectl rollout kubectl autoscale
Open the full explainer →More in Kubernetes & Helm

Reference text is hand-written and may be incomplete — check man kubectl for your version. Test destructive commands on a non-production system first.