Command

Kubernetes Autoscale a Deployment Command

The Kubernetes command to autoscale a deployment is kubectl autoscale deployment foo --min=2 --max=10.

Quick Answer

Command
kubectl autoscale deployment foo --min=2 --max=10
KubernetesCommand

Autoscale a Deployment

Type this command
kubectl autoscale deployment foo --min=2 --max=10

Creates an autoscaler that scales between the given limits.

Learn More

How to autoscale a deployment in Kubernetes

  1. Open the terminal or command interface for Kubernetes.
  2. Type kubectl autoscale deployment foo --min=2 --max=10, replace any placeholders, and run it.

Kubernetes Autoscale a Deployment Command

Run kubectl autoscale deployment foo --min=2 --max=10.

Related Commands

Frequently asked questions

What is the Kubernetes command to autoscale a deployment?

Run kubectl autoscale deployment foo --min=2 --max=10.

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