Skip to content

kubectl get commands

The kubectl get command is the primary way to list resources on a Kubernetes cluster.^[400-devops-06-kubernetes-k8s-learning-08-collect-readme.md]

Listing Pods

To retrieve a list of pods, the standard command is used^[400-devops-06-kubernetes-k8s-learning-08-collect-readme.md]:

[kubectl](<./kubectl.md>) get pods

Listing all resources

To list all resource types in the namespace, the all keyword is used^[400-devops-06-kubernetes-k8s-learning-08-collect-readme.md].

[kubectl](<./kubectl.md>) get all

Output formatting

The output of the command can be modified to provide additional details, such as the IP address or the node where a Pod is running^[400-devops-06-kubernetes-k8s-learning-08-collect-readme.md].

[kubectl](<./kubectl.md>) get all -owide

Sources

^[400-devops-06-kubernetes-k8s-learning-08-collect-readme.md]