rohitg00/kubectl-mcp-server/k8s-cost
Claude Code and agent skill by rohitg00/kubectl-mcp-server
- community
Checking that the SKILL.md file is still in the repository.
Optimize Kubernetes costs through resource right-sizing, unused resource detection, and cluster efficiency analysis. Use for cost optimization, resource analysis, and capacity planning.
Install
npx vskill@latest install rohitg00/kubectl-mcp-server/k8s-costSKILL.md
Kubernetes Cost Optimization
Cost analysis and optimization using kubectl-mcp-server's cost tools.
Requires thecost,kedatoolsets: start kubectl-mcp-server with--toolsets default,cost,keda(orMCP_TOOLSETS=default,cost,keda).
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
| Priority | Rule | Impact | Tools | |
|---|---|---|---|---|
| 1 | Find and delete unused PVCs | CRITICAL | get_idle_resources | |
| 2 | Right-size overprovisioned pods | HIGH | get_resource_recommendations | |
| 3 | Identify idle LoadBalancers | HIGH | kubectl_get | |
| 4 | Scale down non-prod off-hours | MEDIUM | kubectl_scale | |
| 5 | Consolidate small namespaces | LOW | Analysis |
Quick Reference
| Task | Tool | Example | |
|---|---|---|---|
| Namespace cost | get_namespace_cost_allocation | get_namespace_cost_allocation(namespace) | |
| Cluster cost | get_cost_analysis | get_cost_analysis() | |
| Unused PVCs | get_idle_resources | get_idle_resources(namespace) | |
| Right-sizing | get_resource_recommendations | get_resource_recommendations(namespace) |
Quick Cost Analysis
Get Cost Summary
Find Unused Resources
Resource Right-Sizing
Cost Optimization Workflow
1. Identify Overprovisioned Resources
2. Find Idle Resources
3. Analyze Node Utilization
Right-Sizing Guidelines
| Current State | Recommendation | |
|---|---|---|
| CPU usage < 10% of request | Reduce request by 50% | |
| CPU usage > 80% of request | Increase request by 25% | |
| Memory < 50% of request | Reduce request | |
| Memory near limit | Increase limit, monitor OOM |
Cost by Resource Type
Compute (Pods/Deployments)
Storage (PVCs)
Network (LoadBalancers)
Multi-Cluster Cost Analysis
Compare costs across clusters:
Cost Reduction Actions
Immediate Wins
- Delete unused PVCs:
get_idle_resources()then delete - Right-size pods: Apply
get_resource_recommendations() - Scale down dev/staging: Off-hours scaling
Medium-term Optimizations
- Use Spot/Preemptible nodes: For fault-tolerant workloads
- Implement HPA: Auto-scale based on demand
- Use KEDA: Scale to zero for event-driven workloads
Long-term Strategy
- Reserved instances: For stable production workloads
- Multi-tenant clusters: Consolidate small clusters
- 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 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
Security
- Security scanPassed, 96 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingkubernetes-skills/claude/k8s-cost/SKILL.md
Popularity
- Repository stars
- 853
- Repository forks
- 166
- Repository npm downloads, 7 days
- 360
- 7-day trend score
- 48
Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 20 Mar 2026, 8 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/rohitg00/kubectl-mcp-server/k8s-cost)