Difference between revisions of "Kubectl get pods -A"
Jump to navigation
Jump to search
(8 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{lc}} | {{lc}} | ||
+ | [[kubectl get pods]] -A | ||
+ | kubectl get pods -A | cut -d" " -f1 | grep -v NAMESPACE | sort | uniq | wc -l | ||
== Examples == | == Examples == | ||
Line 16: | Line 18: | ||
kube-system kube-proxy-w8xyz 1/1 Running 0 4d18h | kube-system kube-proxy-w8xyz 1/1 Running 0 4d18h | ||
+ | == [[Killercoda]] == | ||
+ | NAMESPACE NAME READY STATUS RESTARTS AGE | ||
+ | kube-system [[calico-kube-controllers]]-58dbc876ff-hdk8n 1/1 Running 2 (3m38s ago) 23d | ||
+ | kube-system canal-75c8k 2/2 Running 0 2m54s | ||
+ | kube-system canal-mjhcj 2/2 Running 0 2m54s | ||
+ | kube-system coredns-584f54878-7297q 1/1 Running 0 23d | ||
+ | kube-system coredns-584f54878-pd6nc 1/1 Running 0 23d | ||
+ | kube-system etcd-controlplane 1/1 Running 0 23d | ||
+ | kube-system kube-apiserver-controlplane 1/1 Running 2 (3m57s ago) 23d | ||
+ | kube-system kube-controller-manager-controlplane 1/1 Running 2 (3m53s ago) 23d | ||
+ | kube-system kube-proxy-l7drf 1/1 Running 0 23d | ||
+ | kube-system kube-proxy-vxdhj 1/1 Running 0 23d | ||
+ | kube-system kube-scheduler-controlplane 1/1 Running 2 (3m55s ago) 23d | ||
== Terraform [[GKE]] == | == Terraform [[GKE]] == | ||
Line 39: | Line 54: | ||
kube-system pdcsi-node-wcgzb 2/2 Running 0 10h | kube-system pdcsi-node-wcgzb 2/2 Running 0 10h | ||
− | == Minikube == | + | == [[Minikube]] == |
kubectl get pods -A | kubectl get pods -A | ||
NAMESPACE NAME READY STATUS RESTARTS AGE | NAMESPACE NAME READY STATUS RESTARTS AGE | ||
kube-system [[coredns]]-565d847f94-wl6cm 1/1 Running 3 (4m37s ago) 20m | kube-system [[coredns]]-565d847f94-wl6cm 1/1 Running 3 (4m37s ago) 20m | ||
− | kube-system [[etcd-minikube | + | kube-system [[etcd]]-minikube 1/1 Running 3 (4m32s ago) 20m |
− | kube-system kube-apiserver-minikube 1/1 Running 3 (4m32s ago) 20m | + | kube-system [[kube-apiserver]]-minikube 1/1 Running 3 (4m32s ago) 20m |
− | kube-system kube-controller-manager-minikube 1/1 Running 3 (4m32s ago) 20m | + | kube-system [[kube-controller-manager]]-minikube 1/1 Running 3 (4m32s ago) 20m |
− | kube-system kube-proxy-v77mg 1/1 Running 3 (4m32s ago) 20m | + | kube-system [[kube-proxy]]-v77mg 1/1 Running 3 (4m32s ago) 20m |
− | kube-system [[kube-scheduler-minikube | + | kube-system [[kube-scheduler]]-minikube 1/1 Running 3 (4m32s ago) 20m |
kube-system [[storage-provisioner]] 1/1 Running 3 (4m52s ago) 20m | kube-system [[storage-provisioner]] 1/1 Running 3 (4m52s ago) 20m | ||
== Related == | == Related == | ||
* <code>[[kubectl get deployments -A]]</code> | * <code>[[kubectl get deployments -A]]</code> | ||
+ | * <code>[[helm install]]</code> | ||
== See also == | == See also == |
Latest revision as of 18:01, 21 October 2023
kubectl get pods -A kubectl get pods -A | cut -d" " -f1 | grep -v NAMESPACE | sort | uniq | wc -l
Examples[edit]
kubectl get pods -A NAMESPACE NAME READY STATUS RESTARTS AGE default grafana-97d4b5896-x324 0/1 Pending 0 41h default metrics-server-679944f8f6-45ttt 0/1 Pending 0 41h default my-release-kubernetes-dashboard-77db8d9694-4p7cg 0/1 Pending 0 41h kube-system aws-node-4zxyz 1/1 Running 0 4d18h kube-system aws-node-hxyz8 1/1 Running 0 4d18h kube-system aws-node-w59tt 1/1 Running 0 4d18h kube-system coredns-5c778788f4-2x4vq 0/1 Pending 0 41h kube-system coredns-5c778788f4-dlhx5 0/1 Pending 0 41h kube-system kube-proxy-xdr4 1/1 Running 0 4d18h kube-system kube-proxy-vtx4 1/1 Running 0 4d18h kube-system kube-proxy-w8xyz 1/1 Running 0 4d18h
Killercoda[edit]
NAMESPACE NAME READY STATUS RESTARTS AGE kube-system calico-kube-controllers-58dbc876ff-hdk8n 1/1 Running 2 (3m38s ago) 23d kube-system canal-75c8k 2/2 Running 0 2m54s kube-system canal-mjhcj 2/2 Running 0 2m54s kube-system coredns-584f54878-7297q 1/1 Running 0 23d kube-system coredns-584f54878-pd6nc 1/1 Running 0 23d kube-system etcd-controlplane 1/1 Running 0 23d kube-system kube-apiserver-controlplane 1/1 Running 2 (3m57s ago) 23d kube-system kube-controller-manager-controlplane 1/1 Running 2 (3m53s ago) 23d kube-system kube-proxy-l7drf 1/1 Running 0 23d kube-system kube-proxy-vxdhj 1/1 Running 0 23d kube-system kube-scheduler-controlplane 1/1 Running 2 (3m55s ago) 23d
Terraform GKE[edit]
NAMESPACE NAME READY STATUS RESTARTS AGE kube-system event-exporter-gke-5479fd58c8-kp556 2/2 Running 0 10h kube-system filestore-node-9tkbc 3/3 Running 0 9h kube-system filestore-node-wpvx6 3/3 Running 0 9h kube-system fluentbit-gke-bsh5d 2/2 Running 0 10h kube-system fluentbit-gke-tw64g 2/2 Running 0 10h kube-system gke-metrics-agent-j84md 1/1 Running 0 10h kube-system gke-metrics-agent-lbbzg 1/1 Running 0 10h kube-system konnectivity-agent-6d57d4855d-7hhp5 1/1 Running 0 10h kube-system konnectivity-agent-6d57d4855d-lf2n7 1/1 Running 0 10h kube-system konnectivity-agent-autoscaler-6dfb4f9cfb-26s2f 1/1 Running 0 10h kube-system kube-dns-autoscaler-f4d55555-6xxm2 1/1 Running 0 10h kube-system kube-dns-b99c7865d-k6kwj 4/4 Running 0 10h kube-system kube-dns-b99c7865d-xws92 4/4 Running 0 10h kube-system kube-proxy-gke-my-project-gke-my-project-gke-fa11ed38-76t6 1/1 Running 0 10h kube-system kube-proxy-gke-my-project-gke-my-project-gke-fa11ed38-8b4f 1/1 Running 0 10h kube-system l7-default-backend-7dc577646d-v66kz 1/1 Running 0 10h kube-system metrics-server-v0.4.5-fb4c49dd6-8td47 2/2 Running 0 10h kube-system pdcsi-node-k24zt 2/2 Running 0 10h kube-system pdcsi-node-wcgzb 2/2 Running 0 10h
Minikube[edit]
kubectl get pods -A NAMESPACE NAME READY STATUS RESTARTS AGE kube-system coredns-565d847f94-wl6cm 1/1 Running 3 (4m37s ago) 20m kube-system etcd-minikube 1/1 Running 3 (4m32s ago) 20m kube-system kube-apiserver-minikube 1/1 Running 3 (4m32s ago) 20m kube-system kube-controller-manager-minikube 1/1 Running 3 (4m32s ago) 20m kube-system kube-proxy-v77mg 1/1 Running 3 (4m32s ago) 20m kube-system kube-scheduler-minikube 1/1 Running 3 (4m32s ago) 20m kube-system storage-provisioner 1/1 Running 3 (4m52s ago) 20m
Related[edit]
See also[edit]
kubectl get
: [all
|componentstatus | pods | apiservices | events
|event
|nodes
|replicaset
|services
|svc
|namespaces
|hpa
|secret | deployments | serviceaccounts | endpoints | daemonset | networkpolicy
],kubectl get -h
Advertising: