Options (8)
booleanGet all namespaces in the current cluster
Example:
kubectl get {{[ns|namespaces]}}booleanGet nodes in a specified namespace
Example:
kubectl get {{[no|nodes]}} {{[-n|--namespace]}} {{namespace}}-n, --namespacebooleanGet nodes in a specified namespace
Example:
kubectl get {{[no|nodes]}} {{[-n|--namespace]}} {{namespace}}booleanGet pods in a specified namespace
Example:
kubectl get {{[po|pods]}} {{[-n|--namespace]}} {{namespace}}booleanGet deployments in a specified namespace
Example:
kubectl get {{[deploy|deployments]}} {{[-n|--namespace]}} {{namespace}}booleanGet services in a specified namespace
Example:
kubectl get {{[svc|services]}} {{[-n|--namespace]}} {{namespace}}-A, --all-namespacesbooleanGet all resources in all namespaces
Example:
kubectl get all {{[-A|--all-namespaces]}}-f, --filenamebooleanGet Kubernetes objects defined in a YAML manifest file
Example:
kubectl get {{[-f|--filename]}} {{path/to/manifest.yaml}}Examples (8)
Get all namespaces in the current cluster
kubectl get [ns|namespaces]Get nodes in a specified namespace
kubectl get [no|nodes] [-n|--namespace] namespaceGet pods in a specified namespace
kubectl get [po|pods] [-n|--namespace] namespaceGet deployments in a specified namespace
kubectl get [deploy|deployments] [-n|--namespace] namespaceGet services in a specified namespace
kubectl get [svc|services] [-n|--namespace] namespaceGet other resources
kubectl get persistentvolumeclaims|secret|...Get all resources in all namespaces
kubectl get all [-A|--all-namespaces]Get Kubernetes objects defined in a YAML manifest file
kubectl get [-f|--filename] path/to/manifest.yamlmade by @shridhargupta | data from tldr-pages