Kubernetes

Kubernetes Emissions Insights Tool (KEIT): Tackling Cloud Carbon Footprints

Published on

KEIT 1

For over a year, we (Jasper and Flavia) have been working on the Kubernetes Emissions Insights Tool (KEIT), a tool designed to help developers and engineers track and reduce the carbon emissions of their Kubernetes clusters. What started as a research project quickly grew into something bigger as we realized the urgency of addressing sustainability in cloud infrastructure. We’ve built this tool because as engineers, we believe it’s our responsibility to tackle not just efficiency and scalability but also environmental impact.

Why We Built KEIT

When we first conceptualized Kubernetes Emissions Insights Tool, we came across an article in The Guardian about communities in Argentina protesting lithium mining. Lithium is crucial for batteries and renewable energy, but its extraction causes environmental damage. It was a reminder of how even solutions to climate change can have unintended consequences. This realization resonated deeply, and it got us thinking: How can we, as cloud engineers, avoid trading one environmental harm for another?

Cloud computing plays a significant role in modern tech ecosystems, but it comes at an environmental cost that’s largely invisible. Datacenters run 24/7, consuming electricity and resources, yet we rarely consider the environmental price of these services. Every piece of software has an emissions footprint, from energy consumption to the hardware it runs on. And that’s why we built KEIT—to make those impacts visible and actionable.

Our goal is to provide a detailed picture of carbon emissions at multiple levels, from application performance to infrastructure overhead. If you don’t know the impact, you can’t manage or reduce it. KEIT changes that by enabling cloud teams to see their carbon impact in real-time.

What Exactly is KEIT?

KEIT isn’t just a carbon monitoring tool; it’s a framework to measure, analyze, and act on the emissions produced by Kubernetes clusters. We designed it to give cloud engineers, developers, and sustainability teams a granular view of how their deployments are impacting the environment.

Here’s what KEIT tracks:

  • Application-level emissions: Know the emissions generated by individual services, namespaces, and applications. It’s critical for developers who want to measure the environmental cost of their code, especially for high-traffic services or resource-heavy applications.
  • Cluster-wide emissions: Track the carbon cost of an entire Kubernetes cluster and even compare different clusters if you're running multi-cloud or hybrid environments.
  • Hardware and Infrastructure impact: Dig into the embodied emissions of the hardware your cloud services run on. This includes the lifecycle costs of the servers themselves, from manufacturing to disposal, often an overlooked contributor to carbon footprints.

Our initial goal was simple: provide insights. But over time, the scope expanded as we saw the potential for KEIT to serve multiple use cases. It’s not just for sustainability teams; developers, DevOps engineers, and CTOs can use KEIT to identify inefficiencies and take proactive steps toward reducing emissions.

Use Cases

  • Developer and product manager insights: Imagine you’re building a testing platform, and every exam period your tests generate a significant carbon footprint. With KEIT, you can identify the highest emissions and optimize or refactor code to make your platform greener.
  • Benchmarking for future improvements: KEIT helps teams measure the environmental impact of current software versions and set a baseline for improvement. Each new release can aim to reduce emissions without sacrificing performance.
  • Identifying carbon-heavy services: Many companies run multiple applications but don’t know which ones generate the most emissions. KEIT provides that visibility, helping organizations like Sanoma and WeTransfer prioritize emission reductions where it matters most.
  • Choosing more sustainable software: If you’re deciding between two deployment methods, like Flux or ArgoCD, KEIT lets you compare which one is more carbon-efficient, enabling you to pick solutions that align with your sustainability goals.

The Journey So Far

Developing KEIT wasn’t just about writing code; it was about navigating a highly complex problem space. Cloud carbon emissions are tricky to measure, especially when factoring in the intricacies of Kubernetes environments. When we started, we knew that existing standards like the Software Carbon Intensity (SCI) formula would give us a foundation. The SCI is great, but it wasn’t built for the complexities of a cloud-native world. It measures:

  • Energy consumption: How much energy your software consumes.
  • Carbon intensity: The environmental impact of the energy based on its source (renewables vs. fossil fuels).
  • Embodied emissions: The emissions tied to the hardware you’re running on—think about the servers, cables, and data centers, all of which require energy to manufacture and maintain.

We wanted to take this further. It’s one thing to know your energy consumption, but what about the hidden costs of the infrastructure? What happens when your data center cooling systems need massive amounts of water or energy? What about the PUE (Power Usage Effectiveness) of the facility? These are all factors that KEIT accounts for.

At events like KubeCon and through conversations with sustainability experts in the CNCF (Cloud Native Computing Foundation), we got deeper insights into the real challenges people face when trying to reduce cloud emissions. Talking to other engineers helped refine our approach and validate our ideas.

Implementation and Tools

Building KEIT required assembling the right set of tools to get accurate data from cloud infrastructures. Here’s what we ended up using:

  • Kepler (Kubernetes-based Efficient Power Level Exporter): Kepler is crucial for providing energy usage data at the server and component levels within Kubernetes clusters. It operates at the hardware level, continuously exposing energy consumption data that can be aggregated in tools like Grafana.

This isn’t as simple as it sounds. Running Kubernetes clusters on AWS adds another layer of complexity because you don’t have direct access to the hardware. That’s where machine-learning models help us estimate energy consumption with reasonable accuracy.

  • Electricity Maps: Real-time data about the carbon intensity of electricity based on geographic location is vital for KEIT. If a cluster is operating in Germany, for example, the emissions data will change based on whether it’s a sunny day (solar power) or a day when more fossil fuels are used. We chose Electricity Maps because they provide regional data down to the hour.
  • Embodied Emissions: Measuring embodied emissions is an ongoing challenge. We’re working with services like Boa Vista to estimate the carbon cost of hardware—CPUs, SSDs, architecture type, and even the lifecycle emissions from production to disposal.

Where Do We Go From Here?

KEIT’s future lies in expanding its usability and accessibility. We’re developing an API to make it easier for teams to integrate KEIT with their workflows, whether it’s feeding data into dashboards, generating reports, or automating emissions monitoring as part of CI/CD pipelines.

We’re also working on a CLI plugin that will allow developers to retrieve KEIT data directly from their terminal, making it a seamless part of their development process. We’ve already deployed KEIT within some of our own projects, and the results are promising. But this is just the beginning.

Our vision is for KEIT to become a core part of how every cloud engineer and team approaches sustainability—a tool that measures and informs decisions.

Conclusion

With the Kubernetes Emissions Insights Tool (KEIT), we’re giving developers and engineers a powerful new tool to measure and reduce their software's carbon footprint. By surfacing emissions data at multiple levels—from applications to data centers—KEIT allows organizations to take meaningful steps toward a more sustainable future.

Cloud-native infrastructure offers unparalleled scalability and flexibility. But now it’s time for the next step: scalability that doesn’t cost the planet.

If you’re deploying Kubernetes, you already understand the importance of efficient resource management. KEIT adds one more dimension: emissions management. Let’s make the cloud greener, together.