kubectl_get
Retrieve or list Kubernetes resources by type, name, and namespace with support for filtering and multiple output formats.
Instructions
Get or list Kubernetes resources by resource type, name, and optionally namespace
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Name of the resource (optional - if not provided, lists all resources of the specified type) | |
| output | No | Output format | json |
| 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) | |
| namespace | No | Kubernetes namespace | default |
| resourceType | Yes | Type of resource to get (e.g., pods, deployments, services, configmaps, events, etc.) | |
| allNamespaces | No | If true, list resources across all namespaces | |
| fieldSelector | No | Filter resources by field selector (e.g. 'metadata.name=my-pod') | |
| labelSelector | No | Filter resources by label selector (e.g. 'app=nginx') |