11/12 free views
Tool
CLI
Container Security

kube-capacity

by robscott

2.4Kstars
120forks
15watchers
Updated 10 months ago
About

kube-capacity is a simple CLI tool that provides a consolidated overview of resource requests, limits, and utilization across Kubernetes clusters.

A simple CLI that provides an overview of the resource requests, limits, and utilization in a Kubernetes cluster

Primary Use Case

This tool is designed for Kubernetes administrators and DevOps engineers who need to monitor and optimize resource allocation within their clusters. It helps users quickly assess CPU and memory usage, requests, and limits at both node and pod levels, enabling better capacity planning and troubleshooting.

Key Features
  • Displays resource requests and limits for CPU and memory at node and pod levels
  • Combines output similar to `kubectl top` and `kubectl describe` for easier resource overview
  • Supports cluster-wide totals for multi-node clusters
  • Includes pod-specific resource details with `--pods` option
  • Shows real-time resource utilization metrics when `--util` is enabled (requires metrics-server)
  • Provides installation via Homebrew and Krew plugin manager
  • Outputs clear tabular data for quick analysis

Installation

  • Access pre-built Go binaries from the GitHub releases page
  • Install via Homebrew: `brew tap robscott/tap`
  • Install via Homebrew: `brew install robscott/tap/kube-capacity`
  • Install via Krew: `kubectl krew install resource-capacity` (use `kubectl resource-capacity` if installed this way)

Usage

>_ kube-capacity

Displays a summary of CPU and memory requests and limits for all nodes in the cluster, including cluster-wide totals.

>_ kube-capacity --pods

Includes detailed pod-level resource requests and limits alongside node summaries.

>_ kube-capacity --util

Adds current CPU and memory utilization metrics to the output, showing how usage compares to requests and limits.

>_ kubectl resource-capacity

Equivalent command when kube-capacity is installed via Krew plugin.

Security Frameworks
Discovery
Resource Development
Collection
Defense Evasion
Execution
Usage Insights
  • Integrate kube-capacity into CI/CD pipelines to detect resource misconfigurations early in the deployment process.
  • Use real-time utilization data to trigger automated scaling or alerting to prevent denial-of-service conditions caused by resource exhaustion.
  • Combine with Kubernetes RBAC auditing tools to correlate resource usage anomalies with potential privilege escalations or lateral movement.
  • Leverage kube-capacity outputs to optimize container resource limits, reducing attack surface related to resource exhaustion and improving cluster stability.
  • Incorporate kube-capacity metrics into security dashboards for continuous monitoring and anomaly detection in container environments.

Docs Take 2 Hours. AI Takes 10 Seconds.

Ask anything about kube-capacity. Installation? Config? Troubleshooting? Get answers trained on real docs and GitHub issues—not generic ChatGPT fluff.

3 free chats per tool • Instant responses • No credit card

Security Profile
Red Team30%
Blue Team70%
Purple Team60%
Details
LicenseApache License 2.0
LanguageGo
Open Issues71
Topics
kubernetes
utilization
resource-management