top_resources
Rank Kubernetes pods, workloads, or nodes by CPU or memory usage to diagnose performance issues like high CPU, memory pressure, or OOMKills.
Instructions
Use when investigating high CPU, memory pressure, OOMKills, slow services, noisy pods, or uneven node load. Returns live metrics ranked like kubectl top pods|nodes | sort, joined with Kubernetes context: pod status, readiness, restarts, owner workload, requests, and limits. kind=pods ranks individual Pods, kind=workloads aggregates Pods to Deployments/StatefulSets/DaemonSets/Jobs, and kind=nodes ranks Nodes. Use before reading logs when the symptom mentions CPU, memory, GC, OOM, latency, or load.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | what to rank: pods (default), workloads, or nodes | |
| namespace | No | filter pods/workloads to a namespace. Required for namespace-restricted users unless they have cluster-wide namespace access. | |
| sort | No | sort by cpu (default) or memory | |
| limit | No | max rows returned, default 20, max 100 |