kubectl get events -ojsonpath

1 개요[ | ]

kubectl get events -ojsonpath
$ kubectl get events -nkube-system 
LAST SEEN   TYPE      REASON              OBJECT                                           MESSAGE
38m         Normal    LeaderElection      endpoints/cloud-controller-manager               katacoda-cloud-provider-758cf7cf75-ktdmf-external-cloud-controller became leader
37m         Normal    LeaderElection      endpoints/cloud-controller-manager               katacoda-cloud-provider-758cf7cf75-ktdmf-external-cloud-controller became leader
35m         Normal    LeaderElection      endpoints/cloud-controller-manager               katacoda-cloud-provider-758cf7cf75-ktdmf-external-cloud-controller became leader
34m         Normal    LeaderElection      endpoints/cloud-controller-manager               katacoda-cloud-provider-758cf7cf75-ktdmf-external-cloud-controller became leader
32m         Normal    LeaderElection      endpoints/cloud-controller-manager               katacoda-cloud-provider-758cf7cf75-ktdmf-external-cloud-controller became leader
31m         Normal    LeaderElection      endpoints/cloud-controller-manager               katacoda-cloud-provider-758cf7cf75-ktdmf-external-cloud-controller became leader
29m         Normal    LeaderElection      endpoints/cloud-controller-manager               katacoda-cloud-provider-758cf7cf75-ktdmf-external-cloud-controller became leader
25m         Normal    LeaderElection      endpoints/cloud-controller-manager               katacoda-cloud-provider-758cf7cf75-ktdmf-external-cloud-controller became leader
18m         Normal    LeaderElection      endpoints/cloud-controller-manager               katacoda-cloud-provider-758cf7cf75-ktdmf-external-cloud-controller became leader
17m         Normal    LeaderElection      endpoints/cloud-controller-manager               katacoda-cloud-provider-758cf7cf75-ktdmf-external-cloud-controller became leader
10m         Normal    LeaderElection      endpoints/cloud-controller-manager               katacoda-cloud-provider-758cf7cf75-ktdmf-external-cloud-controller became leader
9m1s        Normal    LeaderElection      endpoints/cloud-controller-manager               katacoda-cloud-provider-758cf7cf75-ktdmf-external-cloud-controller became leader
2m22s       Normal    LeaderElection      endpoints/cloud-controller-manager               katacoda-cloud-provider-758cf7cf75-ktdmf-external-cloud-controller became leader
50s         Normal    LeaderElection      endpoints/cloud-controller-manager               katacoda-cloud-provider-758cf7cf75-ktdmf-external-cloud-controller became leader
39m         Warning   FailedScheduling    pod/coredns-fb8b8dccf-wcmr6                      0/1 nodes are available: 1 node(s) had taints that the pod didn't tolerate.
38m         Warning   FailedScheduling    pod/coredns-fb8b8dccf-wcmr6                      0/2 nodes are available: 2 node(s) had taints that the pod didn't tolerate.
38m         Normal    Scheduled           pod/coredns-fb8b8dccf-wcmr6                      Successfully assigned kube-system/coredns-fb8b8dccf-wcmr6 to node01
38m         Normal    Pulled              pod/coredns-fb8b8dccf-wcmr6                      Container image "k8s.gcr.io/coredns:1.3.1" already present on machine
38m         Normal    Created             pod/coredns-fb8b8dccf-wcmr6                      Created container coredns
...
$ kubectl get events -nkube-system -ojsonpath='{range .items[*]}{@.involvedObject.namespace}{"| "}{@.lastTimestamp}{" "}{@.type}{" "}{@.reason}{" "}{@.involvedObject.kind}{"/"}{@.involvedObject.name}{"\n"}' | column -t
kube-system|  2020-02-18T04:35:28Z  Normal   LeaderElection     Endpoints/cloud-controller-manager
kube-system|  2020-02-18T04:37:02Z  Normal   LeaderElection     Endpoints/cloud-controller-manager
kube-system|  2020-02-18T04:38:32Z  Normal   LeaderElection     Endpoints/cloud-controller-manager
kube-system|  2020-02-18T04:40:02Z  Normal   LeaderElection     Endpoints/cloud-controller-manager
kube-system|  2020-02-18T04:41:31Z  Normal   LeaderElection     Endpoints/cloud-controller-manager
kube-system|  2020-02-18T04:43:01Z  Normal   LeaderElection     Endpoints/cloud-controller-manager
kube-system|  2020-02-18T04:44:31Z  Normal   LeaderElection     Endpoints/cloud-controller-manager
kube-system|  2020-02-18T04:48:53Z  Normal   LeaderElection     Endpoints/cloud-controller-manager
kube-system|  2020-02-18T04:55:35Z  Normal   LeaderElection     Endpoints/cloud-controller-manager
kube-system|  2020-02-18T04:57:02Z  Normal   LeaderElection     Endpoints/cloud-controller-manager
kube-system|  2020-02-18T05:03:33Z  Normal   LeaderElection     Endpoints/cloud-controller-manager
kube-system|  2020-02-18T05:05:01Z  Normal   LeaderElection     Endpoints/cloud-controller-manager
kube-system|  2020-02-18T05:11:40Z  Normal   LeaderElection     Endpoints/cloud-controller-manager
kube-system|  2020-02-18T05:13:12Z  Normal   LeaderElection     Endpoints/cloud-controller-manager
kube-system|  2020-02-18T04:35:01Z  Warning  FailedScheduling   Pod/coredns-fb8b8dccf-wcmr6
kube-system|  2020-02-18T04:35:16Z  Warning  FailedScheduling   Pod/coredns-fb8b8dccf-wcmr6
kube-system|  2020-02-18T04:35:24Z  Normal   Scheduled          Pod/coredns-fb8b8dccf-wcmr6
kube-system|  2020-02-18T04:35:29Z  Normal   Pulled             Pod/coredns-fb8b8dccf-wcmr6
kube-system|  2020-02-18T04:35:29Z  Normal   Created            Pod/coredns-fb8b8dccf-wcmr6
kube-system|  2020-02-18T04:35:29Z  Normal   Started            Pod/coredns-fb8b8dccf-wcmr6
...

2 같이 보기[ | ]

3 참고[ | ]

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