From the course: Learning Kubernetes
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
View your application logs - Kubernetes Tutorial
From the course: Learning Kubernetes
View your application logs
- [Narrator] In the last few videos, we deployed an application and checked that it's working properly by using Busybox to make a w-get request. There's another way to check that your application is working and that's by looking at the application logs. The first step is to list all the pods that are running our application. Let's run the command, kubectl get pods from the name space development. Copy the name of the pod whose logs you would like to inspect. And then, run the command, kubectl logs, the name of your pod, name space development. So you know, the pod info app logs all http requests, so if you'd like to see some activity in the logs, choose the pod you queried with w-get. I chose a different one. This command prints the logs from your application, which can be helpful if you need to debug application issues. In this chapter, we've deployed an application and explored a few ways to check the health of your…
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
-
-
-
-
-