Skip to content

Commit 66ddf60

Browse files
committed
doc(pods): pods_top retrieves Pod resource consumption (metrics API)
1 parent f931bcc commit 66ddf60

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ A powerful and flexible Kubernetes [Model Context Protocol (MCP)](https://blog.m
2424
- **Get** a pod by name from the specified namespace.
2525
- **Delete** a pod by name from the specified namespace.
2626
- **Show logs** for a pod by name from the specified namespace.
27+
- **Top** gets resource usage metrics for all pods or a specific pod in the specified namespace.
2728
- **Exec** into a pod and run a command.
2829
- **Run** a container image in a pod and optionally expose it.
2930
- **✅ Namespaces**: List Kubernetes Namespaces.
@@ -314,6 +315,23 @@ Run a Kubernetes Pod in the current or provided namespace with the provided cont
314315
- TCP/IP port to expose from the Pod container
315316
- No port exposed if not provided
316317

318+
### `pods_top`
319+
320+
Lists the resource consumption (CPU and memory) as recorded by the Kubernetes Metrics Server for the specified Kubernetes Pods in the all namespaces, the provided namespace, or the current namespace
321+
322+
**Parameters:**
323+
- `all_namespaces` (`boolean`, optional, default: `true`)
324+
- If `true`, lists resource consumption for Pods in all namespaces
325+
- If `false`, lists resource consumption for Pods in the configured or provided namespace
326+
- `namespace` (`string`, optional)
327+
- Namespace to list the Pod resources from
328+
- If not provided, will list Pods from the configured namespace (in case all_namespaces is false)
329+
- `name` (`string`, optional)
330+
- Name of the Pod to get resource consumption from
331+
- If not provided, will list resource consumption for all Pods in the applicable namespace(s)
332+
- `label_selector` (`string`, optional)
333+
- Kubernetes label selector (e.g. 'app=myapp,env=prod' or 'app in (myapp,yourapp)'), use this option when you want to filter the pods by label (Optional, only applicable when name is not provided)
334+
317335
### `projects_list`
318336

319337
List all the OpenShift projects in the current cluster

0 commit comments

Comments
 (0)