i test the script , it's not working will , and here is the issues i face ..
1. Some prods count errors but the count event back empty in general , so you can't count on that to get the errors info when using kubectl get events .
2. in general the filtering you run with "--field-selector=involvedObject.name=$CULPRIT" the variable not set right so it filter all .
Hi Abhishek ,
i test the script , it's not working will , and here is the issues i face ..
1. Some prods count errors but the count event back empty in general , so you can't count on that to get the errors info when using kubectl get events .
2. in general the filtering you run with "--field-selector=involvedObject.name=$CULPRIT" the variable not set right so it filter all .
here is an example with my output :
~$ ./krawl.sh
KRAWL
=================================================================================
NAMESPACE |POD_NAME |CONTAINER_NAME |ERRORS
--------- |-------- |-------------- |------
default |ABC-server-1234567-abcd |key-server |1
default |ABC-server-postgresql-0 |key-server-postgresql |4
kube-system |coredns-1234567-abcd |coredns |20
kube-system |coredns-123456789-abcdef |coredns |20
kube-system |ingress-nginx-ingress-controller-123456789-abcdef |nginx-ingress-controller |8
INFO: 0 pods with errored events found.