top_resources
Rank Kubernetes pods, workloads, or nodes by live CPU or memory usage to pinpoint performance bottlenecks, OOM risks, and uneven node load before investigating logs.
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 | |
| sort | No | sort by cpu (default) or memory | |
| limit | No | max rows returned, default 20, max 100 | |
| namespace | No | filter pods/workloads to a namespace. Required for namespace-restricted users unless they have cluster-wide namespace access. |