Kepler energy per pod in Kubernetes: what the number means

Kepler energy per pod: RAPL counters, zones, PromQL queries in kWh and attribution limits, for an honest Kubernetes energy report.
Kepler énergie pod Kubernetes : que mesure-t-on vraiment ?

An auditor asks how much energy each team’s workloads use on the cluster, in kilowatt-hours per month. All you have are invoices and CPU requests. Kepler energy per pod is one way to answer: a Prometheus exporter that reads the hardware’s energy counters and assigns a share of them to every pod.

Before handing a number to an auditor, you need to know what it is worth. This article starts from that decision: what can you claim with Kepler, and what belongs in the footnote? The facts come from the sustainable-computing-io/kepler repository (Apache 2.0 licence, clone read on 13 November 2026) and from sustainable-computing.io, which describes the project as a CNCF Sandbox project. I did not deploy Kepler for this article: the screenshots are files from the repository.

This differs from our OpenCost article, which turns resources into money. Here we deal with joules measured by the processor.

Kepler energy per pod: what the repository promises

The README describes Kepler as a Prometheus exporter that measures energy at container, pod and node level. The website adds virtual machines and processes. Three points matter in operations.

  • Measurement source: Intel RAPL counters, read through sysfs. The site lists hwmon, NVIDIA GPU and Redfish support as experimental.
  • Privileges: according to the site, read access to /proc and /sys is enough, with no CAP_SYS_ADMIN or CAP_BPF. The installation guide says the DaemonSet runs unprivileged with only SYS_PTRACE.
  • Cadence: the default refresh interval is 5 seconds, and processes shorter than that interval are ignored.

That last point matters: a two-second job leaves no trace in the measurement.

Step 1: check that your nodes have a counter

The trap comes before installation. Kepler only reports what a hardware counter measures. The metrics documentation is blunt: it does not estimate memory energy when the machine does not report it, and virtual machines usually expose no RAPL domain. On those nodes the series simply does not exist.

So test one node before promising any report:

cat /sys/class/powercap/intel-rapl:*/name

If the command prints nothing, the RAPL path is missing. The configuration then offers other backends (rapl, hwmon, fake) in cpu.preferredMeters. The fake backend produces synthetic values for development: never use it for a report.

Step 2: install and read the first series

The README quick start uses Helm from the quay.io OCI registry, then a port-forward on port 28282.

Excerpt from the Kepler README: Helm install into the kepler namespace, waiting for the pods, port-forward on port 28282 and reading the kepler_node_cpu_watts metric

The README recommends the Kepler operator for production. For Kustomize manifests, it asks you to check out a release tag rather than main, and to use the image of the same version.

Step 3: understand zones before adding anything up

CPU metrics carry a zone label. According to the documentation, the zones package, core, uncore, dram and psys can appear, depending on what the hardware and kernel expose. Some overlap: the documentation advises against summing them and recommends filtering on a single zone.

Excerpt from the Kepler metrics documentation: list of energy zones, warning about overlapping zones and PromQL examples using the dram zone

Pick one zone and write it in the report. For a stable CPU figure from one quarter to the next, package is consistent with the documentation’s example. If your fleet mixes machines with and without psys, do not compare zones with each other.

Step 4: query energy per pod

The cumulative metric is kepler_pod_cpu_joules_total, with the labels pod_name, pod_namespace, pod_id, state and zone. The instantaneous version is kepler_pod_cpu_watts. One watt-hour is 3,600 joules, so divide by 3,600,000 for a kilowatt-hour.

# energy over the last day, per namespace, in kWh (example to adapt)
sum by (pod_namespace) (
  increase(kepler_pod_cpu_joules_total{zone="package"}[1d])
) / 3600000

This query is an example written from the metric names in the documentation, not a measured output. Check the labels on your own instance: the documentation lists state without detailing its values, and I did not verify them.

To forward these series to an observability platform, the principle is an ordinary Prometheus scrape, described in our article on Prometheus and Kubernetes. Kepler remains a third-party tool: nothing here is a native Dynatrace feature.

How a pod’s figure is built

This is the part to quote in the footnote. The attribution guide explains that the hardware only measures a total. Kepler splits that total into active and idle energy, then shares the active part according to each workload’s CPU time.

Excerpt from the Kepler attribution guide: workload power equals its CPU time divided by the node's CPU time, multiplied by active power, and the CPU time hierarchy from process to container to pod

The direct consequence: two pods that occupy the CPU for the same time receive the same power, even if one computes hard and the other waits on memory. The guide says so itself.

What the measurement does not tell you

The guide devotes a section to limits. Here are three that matter to an SRE.

  • Sleep states and frequency: for equal CPU time, real consumption varies with the processor’s C-states and P-states.
  • Bursty workloads: a process at 100% for 2 seconds out of 10 and another steady at 20% get the same share, although the burst probably used more.
  • Absolute budgets: the guide lists absolute power budgeting decisions based solely on Kepler metrics among the cases for caution.

It also lists where attribution works well: CPU-bound workloads, steady state, relative comparisons and long-term trends. Those are the uses to keep.

Best practices

  • Check the available zones on one node of each type before promising a report.
  • Always filter on one zone and name it in the report.
  • Present trends and before/after comparisons, not a certified total.
  • Keep Kepler unprivileged unless you need the container name outside Kubernetes.
  • Cross-check with effective pod CPU requests: an oversized pod is the first candidate.

Frequently asked questions

Does Kepler work on virtual machines?

Only if the host exposes a usable counter. The documentation says virtual machines usually expose no RAPL domain; without a counter there is no series, and Kepler does not invent a value.

Can I convert joules into CO2 emissions?

Kepler exports energy and power, not emissions. For a carbon figure, multiply by the carbon intensity of the electricity grid, which is data from outside the tool.

How is it different from OpenCost?

OpenCost allocates spend from prices and allocations, as described in our dedicated article. Kepler allocates energy measured by the hardware. They complement each other without replacing each other.

Conclusion

Kepler gives an order of magnitude and per-pod trends, provided you check the counters and name the zone. Start with one physical node, one zone and one namespace, and present the result as a comparison. Sources: sustainable-computing.io and the Kepler repository.

span.observer is an independent community blog, not affiliated with Dynatrace LLC or the Kepler project. Trademarks belong to their owners. Tools change quickly: check commands and options against the official documentation.

Total
0
Shares
Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post
OpenTelemetry Weaver : valider ses conventions sémantiques en CI

OpenTelemetry Weaver: validate semantic conventions in CI

Related Posts