kubectl get
Resource ManagementDisplay resources
Options & Flags
Available options for this command
-oOutput format (json, yaml, wide, name)
-nNamespace
-AAll namespaces
-lLabel selector
-wWatch for changes
Examples
Common usage examples
List all pods in current namespace
kubectl get podsList pods in all namespaces
kubectl get pods -AList pods with more details
kubectl get pods -o wideList multiple resource types
kubectl get svc,deploy,podsList pods with specific label
kubectl get pods -l app=nginxGet pod definition as YAML
kubectl get pod mypod -o yamlNotes
- Common resources: pods, services, deployments, nodes, configmaps, secrets
Related Commands
You might also find these useful