CmdID

CmdID / Commands

kubectl-scale

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

On several platforms

Opens CmdID with your command. It is read in your browser and sent nowhere.

Several platforms

from tldr-pages, CC BY 4.0

Scale a replica set

kubectl scale --replicas replicas_count rs/replica_nameIdentify
--replicasThe new desired number of replicas. kubectl reference

Scale a resource identified by a file

kubectl scale --replicas replicas_count --filename path/to/file.ymlIdentify
--replicasThe new desired number of replicas. kubectl reference
--filenameFilename, directory, or URL to files identifying the resource to set a new size kubectl reference

Scale a deployment based on current number of replicas

kubectl scale --replicas replicas_count --current-replicas current_replicas [deploy/deployment_nameIdentify
--replicasThe new desired number of replicas. kubectl reference
--current-replicasPrecondition for current size. kubectl reference