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 - 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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
Reading and writing YAML5m 1s
-
(Locked)
Create a namespace2m 34s
-
(Locked)
Deploy an application4m 11s
-
(Locked)
Check the health of a pod by looking at the event logs1m 41s
-
(Locked)
Check that your application is working with BusyBox5m 48s
-
(Locked)
View your application logs1m 16s
-
(Locked)
Challenge1m 5s
-
(Locked)
Solution5m 44s
-
-
-
-
-