Kubernetes pod metrics

Learn about key Kubernetes pod metrics displayed in the Infrastructure UI:

To analyze Kubernetes pod metrics, you can select view filters based on the following predefined metrics, or you can add custom metrics.

Refer to the following sections for pod metrics and field calculation formulas for Kubernetes integration data:

Note

For Kubernetes pod metrics, the Infrastructure UI and inventory rules only support Kubernetes pod metric data collected by the Kubernetes integration. If you're using Elastic OpenTelemetry and these views appear empty, refer to Kubernetes Pods and Docker Containers views empty when using Elastic OpenTelemetry.

The following table lists the fields used to filter, identify, and display each pod entity.

Filter event.module: "kubernetes" Used to filter relevant data.
Identifier kubernetes.pod.uid Used to identify each entity.
Display value kubernetes.pod.name Used as a display friendly value.

The following table lists each predefined pod metric and its field calculation formula.

Metric Description
CPU Usage Percentage of CPU used, measured against the pod's CPU limit. When the pod has no CPU limit, the percentage is measured against the capacity of the node instead.

Field Calculation: average(kubernetes.pod.cpu.usage.limit.pct), falling back to average(kubernetes.pod.cpu.usage.node.pct)
Memory Usage Percentage of memory used, measured against the pod's memory limit. Pods without a memory limit report no value.

Field Calculation: average(kubernetes.pod.memory.usage.limit.pct)
Inbound Traffic Number of bytes received per second.

Field Calculation: derivative(max(kubernetes.pod.network.rx.bytes)) scaled to a 1 second rate
Outbound Traffic Number of bytes sent per second.

Field Calculation: derivative(max(kubernetes.pod.network.tx.bytes)) scaled to a 1 second rate

The Infrastructure UI and inventory rules also support pod metrics collected using OpenTelemetry semantic conventions, through the kubeletstats receiver. To choose which pods you want to see, use the Schema menu described in Select the data collection schema.

Refer to the following sections for pod metrics and field calculation formulas for OpenTelemetry data:

By default, when Elastic Agent is configured as an OTel Collector, it collects Kubernetes node, pod, and container metrics using the kubeletstats receiver. Refer to the default Kubernetes configuration for the receiver settings.

If you're using a different Collector distribution or the upstream Contrib Collector, refer to the Kubernetes OpenTelemetry Assets for the equivalent Collector configuration.

The following table lists the fields used to filter, identify, and display each pod entity.

Filter data_stream.dataset: 'kubeletstatsreceiver.otel' Used to filter relevant data.
Identifier k8s.pod.uid Used to identify each entity.
Display value k8s.pod.name Used as a display friendly value.

The following table lists each predefined pod metric and its field calculation formula.

Metric Description
CPU Usage Percentage of CPU used, measured against the pod's CPU limit. When the pod has no CPU limit, the percentage is measured against the capacity of the node instead.

Field Calculation: average(metrics.k8s.pod.cpu_limit_utilization), falling back to average(metrics.k8s.pod.cpu.node.utilization)
Memory Usage Percentage of memory used, measured against the pod's memory limit. When the pod has no memory limit, the percentage is measured against the capacity of the node instead. If neither value is available, no value is reported.

Field Calculation: average(metrics.k8s.pod.memory_limit_utilization), falling back to average(metrics.k8s.pod.memory.node.utilization)
Inbound Traffic Number of bytes received per second. The maximum is taken for each network interface, then summed across interfaces.

Field Calculation: derivative(sum(max(metrics.k8s.pod.network.io, kql='direction: receive'))) scaled to a 1 second rate
Outbound Traffic Number of bytes sent per second. The maximum is taken for each network interface, then summed across interfaces.

Field Calculation: derivative(sum(max(metrics.k8s.pod.network.io, kql='direction: transmit'))) scaled to a 1 second rate

For information about the fields used by the Infrastructure UI to display Kubernetes pod metrics, see the Infrastructure app fields.