본문 바로가기

Kubernetes

[Kubernetes] node에서 실행중인 pod 조회

반응형

 

node에서 실행중인 pod 조회

$ kubectl get node
$ kubectl get node -L node-group
$ kubectl get po -o wide | egrep "NAME 내 IP 입력"
ex) kubectl get po -o wide | egrep "192-168|1-200|2-100"

 

※ using field-selector

$ kubectl get node
NAME                                            STATUS   ROLES    AGE    VERSION
ip-10-000-000-000.{myregion}.compute.internal   Ready    <none>   5d1h   v1.00.00-eks-cfdc00
...

$ kubectl get po --all-namespaces --field-selector "spec.nodeName=ip-10-000-000-000.{myregion}.compute.internal"
NAMESPACE     NAME                                   READY   STATUS    RESTARTS   AGE
...
kube-system   aws-node-qkddk                         1/1     Running   0          48m
kube-system   coredns-84gbp                          1/1     Running   0          47m
kube-system   fluentd-cloudwatch-9vnkp               1/1     Running   0          47m
kube-system   kube-proxy-fgn6c                       1/1     Running   0          48m
kube-system   kube-state-metrics-54d587f66c-8hjl8    1/1     Running   0          37m
...

 

 

반응형