WEBVTT

00:00.286 --> 00:04.216
Let us now go through the lab
for managing application logs.

00:05.488 --> 00:07.788
We'll go through
and review a few applications,

00:07.869 --> 00:11.976
and then how to review
the logs of these applications

00:12.747 --> 00:14.284
and get useful information.

00:15.011 --> 00:17.161
We've deployed
a POD hosting an application,

00:17.242 --> 00:19.653
inspect it and wait for it to start.

00:19.734 --> 00:21.960
[?] the kubectl get pods.

00:22.041 --> 00:23.291
We see that it's running.

00:23.590 --> 00:24.720
Let's click on Okay.

00:26.151 --> 00:29.551
Now, a user, USER5, has expressed
concerns accessing the application,

00:29.632 --> 00:30.632
identify the cause

00:32.088 --> 00:33.489
and inspect the logs.

00:34.164 --> 00:38.213
Let's take a look at the logs
this application.

00:39.832 --> 00:45.305
We see that there are logs here,

00:46.361 --> 00:51.590
and it says USER5.

00:52.951 --> 00:54.214
That's USER5.

00:55.024 --> 00:58.771
We see that the cause is
the user failed to log in,

00:58.852 --> 01:03.198
as the account is locked
due to too many failed attempts.

01:03.909 --> 01:06.259
It's account locked
due to many failed attempts.

01:06.340 --> 01:07.640
That's the correct answer.

01:11.372 --> 01:13.607
The next one is now have

01:15.195 --> 01:16.712
a new application deployed

01:18.348 --> 01:19.348
as webapp-2.

01:20.769 --> 01:24.269
If you see a user is reporting issues
while trying to purchase an item,

01:24.350 --> 01:26.550
identify the user
and the cause of the issue,

01:26.921 --> 01:28.471
inspect the logs of the webapp.

01:29.659 --> 01:31.209
Let's look at the logs.

01:32.622 --> 01:33.622
Logs again.

01:37.750 --> 01:38.750
Now,

01:38.831 --> 01:43.174
it says a container name must be specified
for the pod webapp-2.

01:43.493 --> 01:45.343
This is because, if you look at this,

01:45.424 --> 01:48.371
this web application has two containers,
and they're ready.

01:48.498 --> 01:49.898
If there are two containers,

01:50.289 --> 01:53.972
you must specify which container's logs
user that we want to see.

01:54.679 --> 01:56.729
There's a simple webapp and there's a db.

01:57.032 --> 01:59.551
We're looking at the web application,

01:59.632 --> 02:03.785
so we'll just specify webapp,

02:05.206 --> 02:06.406
and we can see the logs.

02:06.939 --> 02:07.939
The question is,

02:08.020 --> 02:10.857
a user is reporting issues
while trying to purchase an item,

02:10.938 --> 02:13.938
so we've got to identify the user
and the cause of the issue.

02:14.058 --> 02:16.903
If you look at this,
these are all normal events,

02:17.324 --> 02:18.474
but these are warnings.

02:18.555 --> 02:19.905
Let's look at the warnings.

02:20.371 --> 02:21.868
USER5 failed to log in.

02:23.246 --> 02:24.970
That's not the issue here.

02:25.269 --> 02:26.269
This one says,

02:26.350 --> 02:29.772
USER30 order failed
as the item is out of stock.

02:32.433 --> 02:34.045
Those are the only two issues,

02:34.909 --> 02:36.899
this seems to be the correct one.

02:37.027 --> 02:39.082
It's USER30, an item out of stock.

02:42.106 --> 02:43.546
That's a quick lab

02:44.221 --> 02:46.968
for viewing logs of an application.

