How do you get all events that Kubernetes logged for a pod with name pod1?

Experience Level: Junior
Tags: Kubernetes

Answer

Run the following command:

kubectl get events --field-selector=involvedObject.name=pod1
Kubernetes Certified Application Developer (CKAD) preparation
Kubernetes Certified Application Developer (CKAD) preparation

Are you learning Kubernetes ? Try our test we designed to help you progress faster.

Test yourself
Kubernetes
Kubernetes

Are you learning Kubernetes ? Try our test we designed to help you progress faster.

Test yourself