The Kubernetes integration v1.21.0 brings several changes related to node allocatable resources.
Changes to the cluster explorer
We added support for allocatable resources to the Kubernetes cluster explorer:
The cluster explorer entity list now calculates CPU usage by summing the
allocatableCpuCoresfrom theK8sNodeSampleinstead of usingprocessorCountfromSystemSample. Similarly, memory usage is now calculated by summingallocatableMemoryBytesinstead ofmemoryTotalBytes. Pods' columns now refer to running pods vs. allocatable pods.
In addition to resource consumption, the node's tooltip in the cluster explorer now shows the amount of allocatable pods used by the node.

The node card, which appears when clicking a node in cluster explorer, now shows resource consumption (CPU, memory, and storage) against the allocatable resources.
- CPU usage aggregates
cpuUsedCores,cpuRequestedCores, andcpuLimitCoresfromK8sContainerSample, andallocatableCpuCoresfrom theK8sNodeSample. - Memory usage aggregates
memoryWorkingSetBytes,memoryRequestedBytes, andmemoryLimitBytesfromK8sContainerSample, andallocatableMemoryBytesfromK8sNodeSample. - Storage usage relies on
fsUsedBytesandfsCapacityBytesfromK8sNodeSample.
- CPU usage aggregates
A new pods widget has been added to the node card that shows the amount of pods used against the total allocatable pods of the node.

If you run the unprivileged version of the Kubernetes integration, you can now see the node metrics. Previously, this was only possible with the privileged version.
Changes to the cluster dashboard
The cluster explorer dashboard, which appears when clicking Kubernetes dashboard, has been updated to account for resource consumption against allocatable resources.
- CPU widgets displays
cpuUsedCoresandallocatableCpuCoresfromK8sNodeSample. As for Memory usage, it now showsmemoryWorkingSetBytesandallocatableMemoryBytes. - Disk widgets use
fsUsedBytesandfsCapacityBytesfromK8sNodeSample. - A new pods widget has been added that shows the amount of pods used against the total allocatable pods of the cluster.

Changes to Kubernetes metrics
- Node allocatable resources and capacity are retrieved from the API server and added to the
K8sNodeSampleascapacity<ResourceName>andallocatable<ResourceName>. - The Kubernetes server version is now retrieved from the API server and cached with the
APIServerCacheK8SVersionTTL config option. The version is added toK8sClusterSampleasclusterK8sVersion, and to the inventory. - Add support for static pods status for Kubernetes server versions 1.15 or newer.
- In older versions of Kubernetes, the kubeletes wouldn’t sync the status of the static pods with the API server and would always return a
Pendingstatus. This behavior was fixed in v1.15 of Kubernetes. Our integration now detects what version of Kubernetes the cluster is running and, if it’s 1.15 or newer, it adds the status of the static pods inK8sPodSample.
Other changes
- We have upgraded the
newrelic/infrastructure-bundlebase image to v1.3.8. For more information, see the New Relic Infrastructure Bundle release notes.