kubectl-scale
Set a new size for a deployment, replica set, replication controller, or stateful set. tldr-pages
On several platforms
Several platforms
Scale a replica set
kubectl scale --replicas replicas_count rs/replica_nameIdentify--replicasThe new desired number of replicas. kubectl referenceScale 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 referenceScale 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