简体   繁体   中英

Different unit for Kubernetes resource memory on pods

My question is related to Kubernetes and the units of the metrics used for the HPA (autoscaling).

When I run the command

kubectl describe hpa my-autoscaler

I get (a part of more information) this:

...
Metrics:                                               ( current / target )
  resource memory on pods:                             318067507200m / 1000Mi
  resource cpu on pods  (as a percentage of request):  1% (1m) / 80%
...

In this example, when you can see the metrics for the resource memory on pods , you can see that the unit for the current value is m , which is "millis" (as is described in the official documentation ), but the unit used for the target value is Mi , which is "Mebis"

Is there any problem with the usage of different units?

Thanks!

No, they are just different multipliers. The actual code is using a raw number of bytes under the hood.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM