Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kubernetes autoscaler targetCPUUtilizationPercentage

I'm defining this autoscaler with kubernetes and GCE and I'm wondering what exactly should I specify for targetCPUUtilizationPercentage. That target points to what exactly? Is it the total CPU in my cluster? When the pods referenced in this autoscaler consume more than targetCPUUtilizationPercentage what happens?

like image 988
Romeo Mihalcea Avatar asked Jan 13 '17 21:01

Romeo Mihalcea


People also ask

What is Autoscaler in Kubernetes?

Autoscaling is one of the key features in Kubernetes cluster. It is a feature in which the cluster is capable of increasing the number of nodes as the demand for service response increases and decrease the number of nodes as the requirement decreases.

How do you test auto scaling in Kubernetes?

To test that the horizontal pod autoscaler is working properly, you need to load test this service and make sure that the replicas increase proportionately with traffic. To do this, you will run a BusyBox pod that makes an HTTP call to your service, sleeps for 0.01 seconds, and repeats.

How does cluster Autoscaler work in Kubernetes?

The Cluster Autoscaler automatically adds or removes nodes in a cluster based on resource requests from pods. The Cluster Autoscaler doesn't directly measure CPU and memory usage values to make a scaling decision.


1 Answers

The CPU utilization is the average CPU usage of a all pods in a deployment across the last minute divided by the requested CPU of this deployment. If the mean of the pods' CPU utilization is higher than the target you defined, the your replicas will be adjusted.

You can read more about this topic here.

like image 154
Jan P Avatar answered Oct 17 '22 07:10

Jan P