kubectl_get
Retrieve a specific Kubernetes resource by type and name, or list all resources of a type, with optional namespace, label, and field selectors, and choose output format.
Instructions
Get or list Kubernetes resources by resource type, name, and optionally namespace
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) |