Sunday 19 July 2020

Kubernetes: Get Pods in all the namespaces

'kubectl get pods' command return all the pods in the 'default' namespace.

$kubectl get pods
NAME               READY   STATUS    RESTARTS   AGE
employee-service   1/1     Running   0          8m8s

If you want to know information about all the Pods across all the namespaces, execute below command.

kubectl get pods --all-namespaces

$kubectl get pods --all-namespaces
NAMESPACE              NAME                                         READY   STATUS    RESTARTS   AGE
default                employee-service                             1/1     Running   0          8m
kube-system            coredns-66bff467f8-mdqf8                     1/1     Running   4          31d
kube-system            coredns-66bff467f8-qrv7b                     1/1     Running   4          31d
kube-system            etcd-minikube                                1/1     Running   4          31d
kube-system            kube-apiserver-minikube                      1/1     Running   4          31d
kube-system            kube-controller-manager-minikube             1/1     Running   8          31d
kube-system            kube-proxy-9zlxd                             1/1     Running   4          31d
kube-system            kube-scheduler-minikube                      1/1     Running   8          31d
kube-system            storage-provisioner                          1/1     Running   8          31d
kubernetes-dashboard   dashboard-metrics-scraper-84bfdf55ff-f299w   1/1     Running   3          30d
kubernetes-dashboard   kubernetes-dashboard-bc446cc64-wj865         1/1     Running   4          30d




Previous                                                    Next                                                    Home

No comments:

Post a Comment