Article

Why Scaling?

Jun 26, 2023

|

5

min read

Scaling is an essential requirement for Kubernetes applications because it allows them to handle increasing levels of traffic and workload without compromising their performance, reliability, and availability.

In this example web server service, In a normal traffic scenario, 3 replicas are enough to handle the load. But when a higher traffic situation like a festival day arrives, the Sysadmin might increase the number of replicas to 15 to handle the increased demand.

We can manually scale pods in Kubernetes using the kubectl scale command.

kubectl scale --replicas=15 deployment/my-deployment

After the festive season, the sysadmin can go ahead and manually scale down thereplaces to their usual capacity

kubectl scale --replicas=3 deployment/my-deployment

Limitation: The Sysadmin doesn’t have to wakeup in the middle of night to scale up for unexpected spikes in traffic. The scaling action needs to be automated.