Terraform module to deploy Kepler (Kubernetes Environmental Power Profiling Operator) on Kubernetes using Helm.
Understanding the energy footprint of your workloads is essential for meaningful sustainability improvements. Without accurate power consumption data at the container and pod level, efforts to reduce environmental impact are based on assumptions rather than facts.
Kepler (Kubernetes-based Efficient Power Level Exporter) provides:
- 🔌 Container-level power metrics showing actual energy consumption
- 📊 Real-time monitoring of power usage across your entire cluster
- 🎯 Workload comparison to identify energy-inefficient applications
- 💡 Actionable insights for reducing energy waste
- 📈 Carbon estimation based on actual power consumption
By making power consumption visible at the workload level, Kepler enables teams to identify inefficiencies, optimise resource allocation, and make data-driven decisions about sustainability—transforming energy efficiency from guesswork into measurable engineering practice.
Kepler tracks environmental impact and power consumption of your Kubernetes cluster. It provides metrics for energy efficiency and sustainability monitoring.
- Power Profiling: Track power consumption at container and node levels
- Environmental Metrics: Monitor carbon emissions and energy usage
- Operator Pattern: Uses Kepler Operator for deployment
- Thin wrapper: one
helm_releasefor the operator, withvaluespassed straight through
Important: Kepler requires both Prometheus and cert-manager to function properly:
- Prometheus: Kepler exports metrics to Prometheus for monitoring. Ensure you have Prometheus deployed in your cluster.
- cert-manager: Kepler requires cert-manager to be installed before deployment. Without cert-manager, Kepler will not function properly. Install it using:
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.18.2/cert-manager.yamlmodule "kepler" {
source = "fabiocicerchia/kepler/helm"
release_name = "kepler-operator"
namespace = "kepler-operator"
}| Name | Description | Type | Default | Required |
|---|---|---|---|---|
release_name |
Helm release name for Kepler Operator | string |
"kepler-operator" |
no |
namespace |
Kubernetes namespace for Kepler Operator | string |
"kepler-operator" |
no |
chart_version |
Helm chart version (empty string for latest) | string |
"" |
no |
values |
Helm values for Kepler Operator deployment | any |
{} |
no |
| Name | Description |
|---|---|
namespace |
Kubernetes namespace where Kepler is deployed |
release_name |
Helm release name of Kepler Operator |
chart_version |
Chart version of Kepler deployment |
- Terraform >= 1.0 or OpenTofu >= 1.6
- Helm >= 2.0
- Kubernetes v1.24+
- kubectl configured to access your cluster
This module deploys the Kepler Operator only. Install cert-manager (v1.18.2 or later) and Prometheus before applying it — see Dependencies above.
module "kepler" {
source = "fabiocicerchia/kepler/helm"
}module "kepler" {
source = "fabiocicerchia/kepler/helm"
}module "kepler" {
source = "fabiocicerchia/kepler/helm"
chart_version = "1.0.0"
}# Check Kepler pod
kubectl get pods -n kepler-operator
# Check PowerMonitor (if enabled)
kubectl get powermonitors -A
# View Kepler logs
kubectl logs -n kepler-operator -l app=keplermake help lists them. Every repository in this estate exposes the same eight
verbs, so you do not have to read a Makefile to find out how to build or test it
(FC-GEN-057).
| Verb | What it does here |
|---|---|
setup |
Install the pre-commit hook |
install |
Download the providers this module pins |
lint |
pre-commit run --all-files — the whole gate |
format |
terraform fmt -recursive |
test |
terraform validate on the module and every example |
analyze |
tflint --recursive |
Two verbs have no meaning for a Terraform module. They exit 0 and say so rather than pretending to work (FC-GEN-058):
build— nothing is compiled; the module is consumed from source.run— a module is instantiated by a root module, never executed directly.
MIT