Command

Kubernetes Scale a Resource Command

The Kubernetes command to scale a resource is kubectl scale --replicas=3 rs/foo.

Quick Answer

Command
kubectl scale --replicas=3 rs/foo
KubernetesCommand

Scale a Resource

Type this command
kubectl scale --replicas=3 rs/foo

Scales a replicaset to a given number of replicas.

Learn More

How to scale a resource in Kubernetes

  1. Open the terminal or command interface for Kubernetes.
  2. Type kubectl scale --replicas=3 rs/foo, replace any placeholders, and run it.

Kubernetes Scale a Resource Command

Run kubectl scale --replicas=3 rs/foo.

Related Commands

Frequently asked questions

What is the Kubernetes command to scale a resource?

Run kubectl scale --replicas=3 rs/foo.

Where do I type this Kubernetes command?

Type it in the terminal or command-line interface used by Kubernetes.

Does this Kubernetes command work on Mac and Windows?

Yes. The command text is the same on both platforms when the tool is installed.

Official source · How we verify