Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
rohitg00 avatar

K8s Cost

  • 10 installs
  • 941 repo stars
  • Updated April 8, 2026
  • rohitg00/kubectl-mcp-server

Helps with ai & agent building tasks during AI-assisted development.

About

k8s-cost is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.

  • k8s-cost
  • AI & Agent Building
  • AI-coding skill

K8s Cost by the numbers

  • 10 all-time installs (skills.sh)
  • Ranked #11,937 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/rohitg00/kubectl-mcp-server --skill k8s-cost

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs10
repo stars941
Last updatedApril 8, 2026
Repositoryrohitg00/kubectl-mcp-server

What it does

Helps with ai & agent building tasks during AI-assisted development.

Files

SKILL.mdMarkdownGitHub ↗

Kubernetes Cost Optimization

Cost analysis and optimization using kubectl-mcp-server's cost tools.

When to Apply

Use this skill when:

  • User mentions: "cost", "savings", "optimize", "expensive", "budget"
  • Operations: cost analysis, right-sizing, cleanup unused resources
  • Keywords: "how much", "reduce", "efficiency", "waste", "overprovisioned"

Priority Rules

PriorityRuleImpactTools
1Find and delete unused PVCsCRITICALfind_orphaned_pvcs
2Right-size overprovisioned podsHIGHget_resource_recommendations
3Identify idle LoadBalancersHIGHget_services
4Scale down non-prod off-hoursMEDIUMscale_deployment
5Consolidate small namespacesLOWAnalysis

Quick Reference

TaskToolExample
Namespace costget_namespace_costget_namespace_cost(namespace)
Cluster costget_cluster_costget_cluster_cost()
Unused PVCsfind_orphaned_pvcsfind_orphaned_pvcs(namespace)
Right-sizingget_resource_recommendationsget_resource_recommendations(namespace)

Quick Cost Analysis

Get Cost Summary

get_namespace_cost(namespace)
get_cluster_cost()

Find Unused Resources

find_unused_resources(namespace)
find_orphaned_pvcs(namespace)

Resource Right-Sizing

get_resource_recommendations(namespace)
get_pod_metrics(name, namespace)

Cost Optimization Workflow

1. Identify Overprovisioned Resources

get_resource_recommendations(namespace="production")

get_pod_metrics(name, namespace)
get_resource_usage(namespace)

2. Find Idle Resources

find_orphaned_pvcs(namespace)

find_unused_resources(namespace)

3. Analyze Node Utilization

get_nodes()
get_node_metrics()

Right-Sizing Guidelines

Current StateRecommendation
CPU usage < 10% of requestReduce request by 50%
CPU usage > 80% of requestIncrease request by 25%
Memory < 50% of requestReduce request
Memory near limitIncrease limit, monitor OOM

Cost by Resource Type

Compute (Pods/Deployments)

get_resource_usage(namespace)
get_pod_metrics(name, namespace)

Storage (PVCs)

get_pvc(namespace)
find_orphaned_pvcs(namespace)

Network (LoadBalancers)

get_services(namespace)

Multi-Cluster Cost Analysis

Compare costs across clusters:

get_cluster_cost(context="production")
get_cluster_cost(context="staging")
get_cluster_cost(context="development")

Cost Reduction Actions

Immediate Wins

1. Delete unused PVCs: find_orphaned_pvcs() then delete 2. Right-size pods: Apply get_resource_recommendations() 3. Scale down dev/staging: Off-hours scaling

Medium-term Optimizations

1. Use Spot/Preemptible nodes: For fault-tolerant workloads 2. Implement HPA: Auto-scale based on demand 3. Use KEDA: Scale to zero for event-driven workloads

Long-term Strategy

1. Reserved instances: For stable production workloads 2. Multi-tenant clusters: Consolidate small clusters 3. Right-size node pools: Match workload requirements

Automated Analysis Script

For comprehensive cost analysis, see scripts/find-overprovisioned.py.

KEDA for Cost Savings

Scale to zero with KEDA:

keda_scaledobjects_list_tool(namespace)
keda_scaledobject_get_tool(name, namespace)

KEDA reduces costs by:

  • Scaling pods to 0 when idle
  • Event-driven scaling (queue depth, etc.)
  • Cron-based scaling for predictable patterns

Related Skills

  • k8s-autoscaling - HPA, VPA, KEDA
  • k8s-troubleshoot - Resource debugging

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.