krr  by robusta-dev

CLI tool for Kubernetes resource recommendations based on Prometheus data

created 2 years ago
3,869 stars

Top 12.9% on sourcepulse

GitHubView on GitHub
Project Summary

KRR (Kubernetes Resource Recommender) is a CLI tool designed to optimize Kubernetes resource allocation by analyzing historical pod usage data from Prometheus and other compatible time-series databases. It provides actionable CPU and memory request/limit recommendations to reduce cloud costs and improve application performance, targeting DevOps engineers, SREs, and platform teams.

How It Works

KRR gathers pod usage metrics from data sources like Prometheus, Thanos, and Coralogix. It employs strategies, such as recommending CPU requests at the 95th percentile and memory requests based on the maximum observed value plus a buffer, to suggest optimal resource configurations. This approach aims to right-size containers without requiring agents within the cluster or per-workload VPA object configurations.

Quick Start & Requirements

  • Install: Via Homebrew (brew install robusta-dev/homebrew-krr/krr) or Docker (us-central1-docker.pkg.dev/genuine-flight-317411/devel/krr:v1.8.3).
  • Prerequisites: Prometheus 2.26+, kube-state-metrics, and cAdvisor are required. Specific metrics like container_cpu_usage_seconds_total and container_memory_working_set_bytes must be available.
  • Setup: Local CLI usage is immediate if Prometheus is accessible. In-cluster installation via kubectl apply is also supported.
  • Docs: https://github.com/robusta-dev/krr/blob/main/README.md

Highlighted Details

  • No agent required; can run locally against a cluster.
  • Offers explainability with recommendation graphs.
  • Supports custom recommendation strategies.
  • Integrates with a free Robusta SaaS platform for UI-based analysis.

Maintenance & Community

  • Active development with regular releases.
  • Community support available via Slack: https://robusta.dev/slack.
  • Contributions are welcomed via GitHub pull requests.

Licensing & Compatibility

  • MIT License.
  • Compatible with commercial and closed-source applications.

Limitations & Caveats

  • Future versions are planned for GPU and custom metric support; currently limited to CPU and memory.
  • Auto-discovery of Prometheus relies on specific service labels; manual configuration may be needed.
Health Check
Last commit

1 day ago

Responsiveness

1 week

Pull Requests (30d)
15
Issues (30d)
7
Star History
226 stars in the last 90 days

Explore Similar Projects

Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Tobi Lutke Tobi Lutke(Cofounder of Shopify), and
15 more.

skypilot by skypilot-org

0.4%
8k
Framework for cloud AI/batch jobs, unifying execution across diverse infrastructure
created 4 years ago
updated 1 day ago
Feedback? Help us improve.