Reputation: 67
It may sound like a naive question, I am running some load testing on one of the deployments on k8s. So to get an idea of the CPU utilization, I opened LENS HPA and CPU utilization is being shown like this
can anyone please tell me how to understand this number, earlier it was 380/50% for CPU.
I just want to get an idea of what does this number means, if it is 380/50, is my CPU not big enough?
Upvotes: 1
Views: 5387
Reputation: 3224
It means probably the same as the output from the kubectl describe hpa {hpa-name}:
$ kubectl describe hpa php-apache
Name: php-apache
...
Metrics: ( current / target )
resource cpu on pods (as a percentage of request): 60% (120m) / 50%
It means that CPU has consumption increased to to x % of the request - good example and explanation in the Kubernetes docs:
Within a minute or so, you should see the higher CPU load; for example:
NAME REFERENCE TARGET MINPODS MAXPODS REPLICAS AGE php-apache Deployment/php-apache/scale 305% / 50% 1 10 1 3m
and then, more replicas. For example:
NAME REFERENCE TARGET MINPODS MAXPODS REPLICAS AGE php-apache Deployment/php-apache/scale 305% / 50% 1 10 7 3m
Here, CPU consumption has increased to 305% of the request.
So in your example (380%/50%) it means that you setup HPA to maintain an average CPU utilization across pods to 50% (by increasing and decreasing number of replicas - updating the deployment) and CPU consumption has increased to 380% so the deployment will be resized automatically.
Also check:
Upvotes: 1