FahamLah

Commands

kubectl autoscale deployment

kubectl autoscale deployment <name> --cpu=50% --min=n --max=n

Risk: Careful

What it does

Makes a HorizontalPodAutoscaler that changes replicas from CPU use.

When to use it

Traffic goes up and down during the day.

Example

$ kubectl autoscale deployment shop --cpu=50% --min=3 --max=10

3 to 10 trays, aiming at half-busy CPU.