Commands.app

kubectl get

Resource Management

Display resources

Options & Flags
Available options for this command
-o

Output format (json, yaml, wide, name)

-n

Namespace

-A

All namespaces

-l

Label selector

-w

Watch for changes

Examples
Common usage examples

List all pods in current namespace

kubectl get pods

List pods in all namespaces

kubectl get pods -A

List pods with more details

kubectl get pods -o wide

List multiple resource types

kubectl get svc,deploy,pods

List pods with specific label

kubectl get pods -l app=nginx

Get pod definition as YAML

kubectl get pod mypod -o yaml
Notes
  • Common resources: pods, services, deployments, nodes, configmaps, secrets
Related Commands
You might also find these useful