# Kubernetes.container.cpu.usage.node.pct reports capacity rather than documented allocatable usage

**URL:** <https://discuss.elastic.co/t/kubernetes-container-cpu-usage-node-pct-reports-capacity-rather-than-documented-allocatable-usage/360962>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [June 6, 2024, 12:43pm UTC](https://discuss.elastic.co/t/kubernetes-container-cpu-usage-node-pct-reports-capacity-rather-than-documented-allocatable-usage/360962 "2024-06-06T12:43:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevinsmithwrs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kevinsmithwrs/32/135091_2.png) [@kevinsmithwrs](https://discuss.elastic.co/u/kevinsmithwrs)\
**Post date:** [June 6, 2024, 12:43pm UTC](https://discuss.elastic.co/t/kubernetes-container-cpu-usage-node-pct-reports-capacity-rather-than-documented-allocatable-usage/360962/1 "2024-06-06T12:43:51Z")

</div>

Before opening a Bug, opening this issue as requested.

According to the docs here:

> **[Kubernetes fields | Metricbeat Reference \[8.14\] | Elastic](https://www.elastic.co/guide/en/beats/metricbeat/current/exported-fields-kubernetes.html)**

The kubernetes.container.cpu.usage.node.pct and kubernetes.container.memory.usage.node.pct are supposed to report the node _allocatable_ usage percentages, however they actually report node capacity percentages.

The relevant code is here:

> <https://github.com/elastic/beats/blob/c77302852ef913c7b4e1ed521528df9a7e8ca55d/metricbeat/module/kubernetes/util/kubernetes.go#L627>

Indeed changing the the code from "Capacity" to "Allocatable" in the line above fixes the problem. I notice the Memory usage calculation is also likewise incorrect on line 632 of the above source.

Can this be fixed please?

Thanks,

Kevin
