From the course: Learning Kubernetes

Unlock the full course today

Join today to access over 24,600 courses taught by industry experts.

Check the health of a pod by looking at the event logs

Check the health of a pod by looking at the event logs - Kubernetes Tutorial

From the course: Learning Kubernetes

Check the health of a pod by looking at the event logs

- [Instructor] The beginning of a pod's life is perilous. So many things can go wrong. The container image can be unavailable, causing an error. You could be out of space on your worker nodes, so the pod can't be scheduled. Or a typo can cause the pod to start running, but suddenly stop. Kubernetes saves the event logs when a pod is created, and if you know how to view these, you can troubleshoot issues. The first step is to find the pod whose event logs you'd like to view. Let's run kubectl get pods from the namespace "development." We'll copy the name of one pod. Any of the three will do. Next, run the command kubectl describe pod, the name of the pod, and then namespace "development." There's a lot of information here. Let's scroll up to the top. And some of it should look familiar from our YAML manifest. To see the event logs, let's scroll down to the bottom. If your pod is running and healthy, you'll see…

Contents