FinOps & Cost Analysis
Cost analysis
Section titled “Cost analysis”KubeGlass computes cost estimates from cluster metrics - no external cost exporter required.
What you get
Section titled “What you get”- Per-namespace breakdown - CPU and memory requests, limits, and actual usage
- Per-workload detail - Container-level resource consumption
- Efficiency score - 0–100 score based on request-to-usage ratio
How it works
Section titled “How it works”Costs are derived from:
- CPU and memory allocations (requests + limits) per container
- Actual usage from Prometheus or the Kubernetes Metrics API
- Configurable cost rates per CPU core and per GiB of memory
No cloud billing API integration is needed. The numbers reflect resource allocation efficiency, which is what platform teams can control.
Cost rate configuration
Section titled “Cost rate configuration”Set custom cost rates via the Admin Settings panel or environment variables:
| Setting | Default | Example |
|---|---|---|
| CPU cost per core/hour | $0.031 | KUBEGLASS_COST_CPU_HOUR=0.031 |
| Memory cost per GiB/hour | $0.004 | KUBEGLASS_COST_MEM_HOUR=0.004 |
| Storage cost per GiB/month | $0.10 | KUBEGLASS_COST_STORAGE_MONTH=0.10 |
These rates are approximate and can be tuned to match your cloud provider’s pricing.
Efficiency scoring
Section titled “Efficiency scoring”The efficiency score measures how well resources are used:
| Score | Rating | Meaning |
|---|---|---|
| 80–100 | Excellent | Requests closely match actual usage |
| 60–79 | Good | Minor over-provisioning, room for optimization |
| 40–59 | Fair | Significant over-provisioning |
| 0–39 | Poor | Major waste - most allocated resources are idle |
Rightsizing
Section titled “Rightsizing”The rightsizing engine flags three conditions:
| Finding | Meaning |
|---|---|
| Over-provisioned | Requests are significantly higher than actual usage |
| Under-provisioned | Usage regularly exceeds requests (risk of OOMKill or throttling) |
| Missing constraints | No resource requests or limits set at all |
Each finding includes a recommendation with suggested request/limit values based on observed usage patterns over the analysis window (default: 7 days).
How recommendations are calculated
Section titled “How recommendations are calculated”- Collect usage metrics over the analysis window
- Compute P95 and P99 usage values for CPU and memory
- Recommend requests at P95 and limits at P99 with a configurable buffer (default: 20%)
- Flag containers where current requests differ from recommendations by more than 30%
Related
Section titled “Related” Health Scanning Find pods with missing resource constraints
Configuration Cost rate settings and analysis window