kubectl-get
lists Kubernetes resources
TLDR
List pods
SYNOPSIS
kubectl get [options] resource [name]
DESCRIPTION
kubectl get retrieves and displays one or more Kubernetes resources from the cluster. It is the most frequently used kubectl subcommand for inspecting cluster state, supporting every resource type including pods, deployments, services, nodes, configmaps, and custom resources defined by CRDs.
The command provides flexible output formatting through the `-o` flag, including human-readable tables, YAML, JSON, JSONPath expressions, and custom column definitions. Results can be filtered by label selectors, field selectors, and namespaces, or retrieved across all namespaces with the `-A` flag. The `--watch` flag enables real-time streaming of resource changes via the Kubernetes watch API.
By default, the output shows a summary table with key fields like name, status, and age. The `wide` output format adds additional columns such as node assignments and IP addresses, while structured formats like YAML and JSON return the complete resource specification for scripting and automation.
PARAMETERS
RESOURCE
Resource type (pods, deployments, services, etc.).NAME
Resource name (optional).-o FORMAT
Output format (yaml, json, wide, custom-columns).--watch
Watch for changes.-A, --all-namespaces
All namespaces.-l SELECTOR
Label selector.-n NAMESPACE
Target namespace.--help
Display help information.
CAVEATS
Subcommand of kubectl. Wide output for more columns. Watch doesn't catch all changes.
HISTORY
kubectl get is the primary resource listing command for Kubernetes cluster inspection.
SEE ALSO
kubectl(1), kubectl-describe(1), kubectl-watch(1)
