반응형
serviceAccount 를 현재 사용하고 있는 pod 들을 조회하기 위해서는 --field-selector 옵션을 통해 조회 가능하다.
$ kubectl get pods -n kube-system --field-selector spec.serviceAccountName=cilium -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
cilium-2nrnz 1/1 Running 0 13m 172.16.1.1 worker1 <none> <none>
cilium-ldsn5 1/1 Running 0 13m 172.16.1.2 worker2 <none> <none>
cilium-pcm6x 1/1 Running 0 13m 172.16.1.3 master <none> <none>
serviceAccount 뿐만아니라 여러 field 선택을 통해 다른것들도 조회가능하다.
https://kubernetes.io/ko/docs/concepts/overview/working-with-objects/field-selectors/
반응형
'Develop > k8s' 카테고리의 다른 글
kubeadm token 재생성 (0) | 2024.09.11 |
---|---|
Failed to start ContainerManager invalid kernel flag: kenrnel/panic, expected valued: 10, actual value :0 (0) | 2024.08.12 |
k8s container image prune CronJob (0) | 2024.07.05 |
Alpine linux Pod shell script No such file or directory (0) | 2024.04.17 |
cri-o error validating runtime config: cannot enable checkpoint/restore support without the criu binary in (0) | 2024.04.09 |