Kubernetes scaling of Client Applications Kubernetes scaling of Client Applications kubernetes kubernetes

Kubernetes scaling of Client Applications


As I already mentioned in the comments, you can use the Horizontal Pod Autoscaler:

The Horizontal Pod Autoscaler automatically scales the number of Podsin a replication controller, deployment, replica set or stateful setbased on observed CPU utilization (or, with custom metricssupport, on some other application-provided metrics).

The Autoscaler operates on the ratio between desired metric value and current metric value:

desiredReplicas = ceil[currentReplicas * ( currentMetricValue / desiredMetricValue )]

Therefore you will be able to scale up/down your app based on the load at the given time.

Also, see the kubectl autoscale command:

Creates an autoscaler that automatically chooses and sets the numberof pods that run in a kubernetes cluster.

and a Horizontal Pod Autoscaler Walkthrough for a step by step guide with examples.