Agent skill
get-resource-usage
Get resource usage metrics for nodes and pods. Uses Kubernetes metrics server to retrieve CPU and memory usage. Use for capacity planning or investigating resource issues. Keywords: resource usage, CPU, memory, metrics, capacity.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/get-resource-usage
Metadata
Additional technical details for this skill
- domain
- k8s
- category
- collection
- confidence
- 0.85
- mcp servers
-
[ "kubernetes-mcp-server" ] - requires approval
- NO
SKILL.md
Get Resource Usage
Preconditions
Before applying this skill, verify:
- Metrics server is installed and running
- Cluster has metrics-server or equivalent
Actions
1. Get Node Resource Usage
Retrieve CPU and memory usage for all nodes.
mcp_tool: kubernetes-mcp-server/nodes_top
params: {}
timeout: 30s
2. Get Pod Resource Usage
Retrieve CPU and memory usage for pods.
mcp_tool: kubernetes-mcp-server/pods_top
params:
all_namespaces: true
timeout: 30s
3. Get Node Stats Summary
Get detailed stats from kubelet for specific node.
mcp_tool: kubernetes-mcp-server/nodes_stats_summary
params:
name: $node_name
timeout: 30s
Success Criteria
The skill succeeds when:
- Metrics retrieved for all nodes
- CPU and memory values are valid
- No errors from metrics API
Failure Handling
If metrics are unavailable:
- Check if metrics-server is running
- Verify node kubelet is responsive
- Return partial data if some nodes fail
Examples
Output:
{
"nodes": [
{
"name": "node1",
"cpu_percent": 45,
"memory_percent": 62,
"cpu_cores": "2000m",
"memory_bytes": "4Gi"
}
],
"top_pods": [
{
"name": "vllm-abc123",
"namespace": "vllm",
"cpu": "1500m",
"memory": "16Gi"
}
]
}
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?