GreenKube

GreenKube Logo

GreenKube

Measure, understand, and reduce the carbon footprint of your Kubernetes infrastructure.

GreenKube is an open-source FinGreenOps platform for Kubernetes. It gives DevOps, SRE, and FinOps teams real-time carbon visibility and cost control — without complex setup or expensive SaaS tooling.

License: Apache 2.0 Docker Pulls Python Coverage Frontend Coverage Tests Build in Public

Live demo: demo.greenkube.cloud — explore the full dashboard with realistic sample data, no install required.


What it does


Screenshots

Grafana dashboard

Frontend screenshots

Dashboard Metrics
Nodes Recommendations
Report Settings

Documentation

Document Description
Architecture Technical architecture, data flow, and component breakdown
Power estimation methodology How energy and CO₂e are calculated
Configuration All Helm values and environment variables
API Reference REST API endpoints, parameters, and examples
CLI Reference greenkube report, recommend, and other CLI commands
Recommendation lifecycle How recommendations are generated, persisted, actioned, and measured
Prometheus & Grafana ServiceMonitor setup and Grafana dashboard import
Sustainability score How the 0–100 composite score is computed
Changelog Version history

Published dashboard on Grafana.com: https://grafana.com/grafana/dashboards/25377-greenkube-fingreenops-dashboard/

Installation

The recommended deployment method is the official Helm chart.

helm repo add greenkube https://GreenKubeCloud.github.io/GreenKube
helm repo update
helm install greenkube greenkube/greenkube \
  -n greenkube \
  --create-namespace

Once deployed, access the dashboard:

kubectl port-forward svc/greenkube-api 8000:8000 -n greenkube
# Open http://localhost:8000

Key configuration variables

Create a my-values.yaml to customise your deployment:

secrets:
  # Electricity Maps API token for real-time grid carbon intensity.
  # Free token: https://www.electricitymaps.com/
  electricityMapsToken: ""

config:
  prometheus:
    url: ""              # Leave empty for automatic in-cluster discovery
    queryRangeStep: 5m   # Metric collection window

Apply it:

helm upgrade greenkube greenkube/greenkube \
  -n greenkube \
  -f my-values.yaml

For the full list of available variables, see the Configuration reference.

Dependencies

GreenKube auto-discovers the following services. No manual configuration is required in most cases.

Service Purpose Required?
Prometheus CPU, memory, network, disk metrics Strongly recommended
OpenCost Cost allocation data Optional

On-premises clusters

Cloud providers expose zone labels on nodes automatically. On bare-metal clusters, label your nodes manually:

kubectl label nodes --all topology.kubernetes.io/zone=FR

Then set config.cloudProvider: on-prem and config.defaultZone: FR in your values. See the Configuration reference for details.


Try the demo locally

docker run --rm -p 9000:9000 greenkube/greenkube demo --no-browser --port 9000
# Open http://localhost:9000

This generates 30 days of sample data for 22 pods across 5 namespaces and 3 nodes, including carbon emissions, costs, and optimization recommendations.


Contributing

Contributions are welcome. See CONTRIBUTING.md to get started.

git clone https://github.com/GreenKubeCloud/GreenKube.git
cd GreenKube
uv sync
pytest

Licence

Licensed under the Apache 2.0 License.