When I run kubectl -n abc-namespace describe pod my-pod-zl6m6
, I get a lot of information about the pod along with the Events in the end.
Is there a way to output just the Events of the pod either using kubectl describe
or kubectl get
commands?
You can use the event
command of kubectl
.
To filter for a specific pod you can use a field-selector:
kubectl get event --namespace abc-namespace --field-selector involvedObject.name=my-pod-zl6m6
To see what fields are possible you can use kubectl describe
on any event.