realopslabs/kubeledger
System of Record for Kubernetes cost accounting: per-namespace CPU, memory and GPU usage, with the 30% non-allocatable overhead made visible. Connects to AI assistants via MCP (Claude, Gemini, Mistral, Cursor) for plain-language analysis. Formerly Kube-Opex-Analytics.
What it solves
KubeLedger is a usage accounting tool for Kubernetes clusters that provides a comprehensive view of resource costs. It specifically addresses the problem of "hidden" costs—non-allocatable overhead (such as OS and kubelets) that typically accounts for 30% of cluster resources—to enable precise per-namespace accounting and cost allocation.
How it works
KubeLedger acts as a System of Record by polling CPU, Memory, and GPU (via NVIDIA DCGM) metrics every five minutes from the Kubernetes Metrics Server and DCGM Exporter. This data is stored in lightweight round-robin databases (RRD) and consolidated into hourly, daily, and monthly aggregates. These aggregates are then written to JSON files in a shared volume, which are served via a Flask API to a built-in web UI and a Prometheus exporter.
Who it’s for
It is designed for engineering and financial teams who need to track resource usage, analyze efficiency, and perform cost allocation or chargeback for Kubernetes environments, including OpenShift.
Highlights
- Comprehensive Resource Tracking: Monitors CPU, Memory, and GPU utilization and requests per namespace.
- Overhead Visibility: Tracks non-allocatable capacity to reveal system overhead versus usable application capacity.
- Hiding-Cost Analysis: Provides usage efficiency analysis by comparing actual usage against resource requests to identify over-provisioning.
- AI Assistant Integration: Includes an optional Model Context Protocol (MCP) server that allows AI tools (like Claude, Gemini, and Cursor) to query analytics data using plain language.
- Prometheus Integration: Features a native exporter for integration with Grafana dashboards and alerting.
Related
- Project
- Project
- Project
- Project