ConfigsApr 18, 2026·3 min read

KRR — Prometheus-Based Kubernetes Resource Recommendations

KRR (Kubernetes Resource Recommender) by Robusta analyzes Prometheus metrics to generate CPU and memory resource recommendations for Kubernetes workloads, helping teams right-size pods and reduce cloud costs.

Introduction

KRR connects to your existing Prometheus (or compatible) metrics backend and analyzes historical CPU and memory usage for every workload in your Kubernetes cluster. It then recommends optimized resource requests and limits, helping teams eliminate over-provisioning and reduce infrastructure costs without risking performance.

What KRR Does

  • Queries Prometheus for historical CPU and memory usage per pod and container
  • Calculates optimized resource requests and limits using configurable strategies
  • Outputs recommendations as a table, JSON, or YAML for easy integration
  • Supports all workload types including Deployments, StatefulSets, DaemonSets, and Jobs
  • Scans single namespaces or entire clusters in one command

Architecture Overview

KRR runs as a CLI tool that connects to the Kubernetes API to discover workloads and their current resource settings. It then queries a Prometheus-compatible metrics source for historical data over a configurable time window. A recommendation strategy (simple percentile-based or custom) analyzes the metrics and produces suggested values for each container. No cluster-side components are required.

Self-Hosting & Configuration

  • Install via pip, pipx, or run as a Docker container
  • Point to your Prometheus endpoint with --prometheus-url
  • Compatible with Prometheus, Thanos, Victoria Metrics, and Amazon Managed Prometheus
  • Adjust the lookback window with --history-duration (default: 14 days)
  • Filter by namespace, label selector, or workload type using CLI flags

Key Features

  • Agentless operation that requires no cluster-side installation or CRDs
  • Works with any Prometheus-compatible backend out of the box
  • Configurable recommendation strategies with adjustable percentile thresholds
  • Savings estimation showing potential cost reduction per workload
  • JSON and YAML output modes for CI/CD pipeline integration

Comparison with Similar Tools

  • Kubernetes VPA — Requires in-cluster components and can auto-apply changes; KRR is read-only and agentless
  • Goldilocks — Web dashboard for VPA recommendations; KRR is a CLI tool that queries Prometheus directly
  • Kubecost — Full cost monitoring platform; KRR focuses specifically on resource right-sizing
  • kubectl top — Shows current usage only; KRR analyzes historical trends for informed recommendations

FAQ

Q: Does KRR automatically apply the recommendations? A: No. KRR is read-only and only outputs recommendations. You apply them manually or through your GitOps pipeline.

Q: How much historical data does KRR need? A: At least a few days of Prometheus metrics. The default lookback window is 14 days for reliable recommendations.

Q: Does KRR work with GKE Autopilot or EKS Fargate? A: KRR generates recommendations, but managed serverless environments may not support custom resource requests.

Q: Is KRR free? A: Yes. KRR is open source under the MIT license.

Sources

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets