Kubernetes: List pods
SafePods with status, restarts, age, pod IP and node. po is the short name for pods; -A for all namespaces, -w to watch.
kubectl get po -n <namespace> -o wideWhat each part does
kubectl getlist resources of a typeposhort name for pods (pod and pods work too)-n <namespace>in this namespace; -A for every namespace-o wideadd the pod IP, the node and nominated node columns
Example
$ kubectl get po -n shop -o wide
NAME READY STATUS RESTARTS AGE IP NODE
api-7d9f8c6b5d-2xkqp 1/1 Running 0 3h 10.244.1.17 node-a
api-7d9f8c6b5d-9wz4t 1/1 Running 2 3h 10.244.2.9 node-bAlso known as: kubectl get po · kubectl get pods · list pods · show pods