Kubectl: Get Pods – List All Pods – Kubernetes

A Pod is a group of one or more containers with shared storage, network and lifecycle and is the basic deployable unit in Kubernetes.

Each Pod is scheduled on the same Node, and remains there until termination or deletion.

In case of a Node failure, identical Pods are scheduled on other available Nodes in the cluster.

In this note i will show how to list Pods in Kubernetes cluster and how to get detailed information about them using the kubectl command.

Cool Tip: List Nodes in Kubernetes cluster! Read more →

List Pods using Kubectl

Info: Add -o wide option to the kubectl get command to get more details.

List Pods in the default Namespace for the current context:

$ kubectl get pods
$ kubectl get pods -o wide

List all Pods from the all Namespaces:

$ kubectl get pods --all-namespaces 
$ kubectl get pods --all-namespaces -o wide

Get Pods from the particular Namespace:

$ kubectl get pods --namespace <namespace_name>
$ kubectl get pods --namespace <namespace_name> -o wide

Get detailed information about a Pod:

$ kubectl describe pode <pode_name>

Cool Tip: List Namespaces in Kubernetes cluster! Read more →