batch_top_resources
Monitor Kubernetes resource usage by fetching CPU and memory metrics for multiple nodes and pods at once.
Instructions
批量查看 Node/Pod 的 CPU、内存使用(类似 kubectl top)
Args: resource_types: 资源类型,JSON 数组如 ["nodes","pods"] 或 "nodes" 或 "pods" namespace: 命名空间(仅对 pods 有效) kubeconfig_path: kubeconfig 文件路径,不指定则使用 cluster_name 或默认集群 cluster_name: 集群配置名称(clusters.json 中的 name),kubeconfig_path 未指定时使用
Returns: nodes 和/或 pods 的 CPU、内存使用数据。依赖集群已部署 metrics-server。
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"resource_types": "<resource_types>"
},
"name": "batch_top_resources"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| namespace | No | default | |
| cluster_name | No | ||
| resource_types | Yes | ||
| kubeconfig_path | No |