kubectl restart 0이 아닌 pod 목록 조회

Jmnote (토론 | 기여)님의 2024년 2월 29일 (목) 13:59 판 (새 문서: ==개요== {{소문자}} ;kubectl restart 0이 아닌 pod 목록 조회 <syntaxhighlight lang='console'> $ kubectl get pods -A -o jsonpath='{range.items[*]}{.metadata.namespace}/{.m...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

1 개요

kubectl restart 0이 아닌 pod 목록 조회
$ kubectl get pods -A -o jsonpath='{range.items[*]}{.metadata.namespace}/{.metadata.name}:{.status.phase}:{.status.containerStatuses[0].restartCount}{"\n"}{end}' | grep -v "0:"
kube-system/calico-kube-controllers-9d57d8f49-wlth4:Running:3
kube-system/canal-2tpsc:Running:1
kube-system/canal-kn5fq:Running:1
kube-system/coredns-86b698fbb6-5n5c8:Running:1
kube-system/coredns-86b698fbb6-ww4kn:Running:1
kube-system/etcd-controlplane:Running:2
kube-system/kube-apiserver-controlplane:Running:2
kube-system/kube-controller-manager-controlplane:Running:2
kube-system/kube-proxy-f8kcp:Running:2
kube-system/kube-proxy-l9tvl:Running:1
kube-system/kube-scheduler-controlplane:Running:2
local-path-storage/local-path-provisioner-5d854bc5c4-tszl5:Running:2
$ kubectl get pods -A -o jsonpath='{range.items[*]}{.metadata.namespace}/{.metadata.name}:{.status.phase}:{.status.containerStatuses[0].restartCount} {.spec.nodeName}{"\n"}{end}' | grep -v "0:" | column -t
kube-system/calico-kube-controllers-9d57d8f49-wlth4:Running:3         controlplane
kube-system/canal-2tpsc:Running:1                                     node01
kube-system/canal-kn5fq:Running:1                                     controlplane
kube-system/coredns-86b698fbb6-5n5c8:Running:1                        node01
kube-system/coredns-86b698fbb6-ww4kn:Running:1                        node01
kube-system/etcd-controlplane:Running:2                               controlplane
kube-system/kube-apiserver-controlplane:Running:2                     controlplane
kube-system/kube-controller-manager-controlplane:Running:2            controlplane
kube-system/kube-proxy-f8kcp:Running:2                                controlplane
kube-system/kube-proxy-l9tvl:Running:1                                node01
kube-system/kube-scheduler-controlplane:Running:2                     controlplane
local-path-storage/local-path-provisioner-5d854bc5c4-tszl5:Running:2  controlplane

2 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}