Kubernetes

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

The same reference, with no signal at all

Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.

Get it free on the App Store