kubectl_get
Retrieve or list Kubernetes resources by specifying type, name, namespace, and optional filters like label or field selectors to obtain targeted cluster information.
Instructions
Get or list Kubernetes resources by resource type, name, and optionally namespace
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": {
"resourceType": "<resourceType>"
},
"name": "kubectl_get"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| resourceType | Yes | Type of resource to get (e.g., pods, deployments, services, configmaps, events, etc.) | |
| name | No | Name of the resource (optional - if not provided, lists all resources of the specified type) | |
| namespace | No | Kubernetes namespace | default |
| output | No | Output format | json |
| allNamespaces | No | If true, list resources across all namespaces | |
| labelSelector | No | Filter resources by label selector (e.g. 'app=nginx') | |
| fieldSelector | No | Filter resources by field selector (e.g. 'metadata.name=my-pod') | |
| sortBy | No | Sort events by a field (default: lastTimestamp). Only applicable for events. | |
| context | No | Kubeconfig Context to use for the command (optional - defaults to null) |