commands.sh

kubectl scale

all

Set a new size for a deployment, replica set, replication controller, or stateful set.

More info →

Options (2)

-f, --filenameboolean

Scale a resource identified by a file

Example: kubectl scale --replicas {{replicas_count}} {{[-f|--filename]}} {{path/to/file.yml}}
boolean

Scale a deployment based on current number of replicas

Example: kubectl scale --replicas {{replicas_count}} --current-replicas {{current_replicas}} {{[deploy|deployment]}}/{{deployment_name}}

Examples (3)

Scale a replica set

kubectl scale --replicas replicas_count rs/replica_name

Scale a resource identified by a file

kubectl scale --replicas replicas_count [-f|--filename] path/to/file.yml

Scale a deployment based on current number of replicas

kubectl scale --replicas replicas_count --current-replicas current_replicas [deploy|deployment]/deployment_name
made by @shridhargupta | data from tldr-pages