k8s-resource-analyzer

Analyze Kubernetes pod resource usage and generate recommendations for HPA adoption.

31|4|Updated Aug 24, 2021
One-click install
npx skills add https://github.com/razorpay/trino-gateway --skill k8s-resource-analyzer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: k8s-resource-analyzer
Source: https://github.com/razorpay/trino-gateway/tree/main/.agents/skills/k8s-resource-analyzer
Command: npx skills add https://github.com/razorpay/trino-gateway --skill k8s-resource-analyzer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires requests, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Analyzes Kubernetes pod resource usage against configured requests and limits to reveal inefficiencies and guide safe, cost-aware adjustments.

Core Features & Use Cases

  • Fetch pod definitions from Kubernetes (via Friday MCP) to obtain resource requests and limits per deployment across prod-green and prod-white.
  • Query Prometheus metrics (CPU/memory) via Grafana MCP to compute P95 usage over configurable windows.
  • Analyze usage vs. allocations to generate concrete recommendations, including HPA candidates and safety checks, and produce a structured report.

Quick Start

Run the skill against a namespace to generate a detailed recommendations report across configured clusters.

Frequently Asked Questions about k8s-resource-analyzer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize Kubernetes pod resource requests and limits to cut costs?

To optimize Kubernetes pod resources, you analyze current CPU and memory usage against configured requests and limits to reveal inefficiencies and guide safe, cost-aware adjustments. This process computes P95 usage over configurable time windows to generate concrete recommendations.

How do I determine if a Kubernetes deployment is safe for HPA adoption?

Determining HPA adoption safety requires analyzing Kubernetes pod resource usage against allocations to ensure sufficient headroom. By computing P95 CPU and memory metrics, you can identify HPA candidates and perform safety checks before scaling.

Do I need Prometheus and Grafana metrics to analyze Kubernetes resource usage?

You need Prometheus and Grafana metrics to analyze Kubernetes resource usage effectively. Querying Prometheus metrics via Grafana MCP computes P95 CPU and memory usage over configurable windows, which is required to generate accurate optimization recommendations.

Can I analyze Kubernetes pod resource usage across multiple clusters?

You can analyze Kubernetes pod resource usage across multiple clusters, specifically supporting multi-cluster workflows for prod-green and prod-white environments. It orchestrates pod discovery and metrics collection across these configured clusters to produce a comprehensive report.

What is the best way to analyze Kubernetes CPU and memory limits for cost optimization?

The best way to analyze Kubernetes CPU and memory limits for cost optimization is to fetch pod definitions via kubectl access and query Prometheus metrics to compute P95 usage. This reveals allocation inefficiencies and produces a structured recommendations report.

What do I need to access Kubernetes pod definitions for resource analysis?

To access Kubernetes pod definitions for resource analysis, you need Friday MCP for kubectl access. This allows the analysis workflow to fetch resource requests and limits per deployment across your configured clusters.