Let us now go through the lab for managing application logs.
We'll go through and review a few applications,
and then how to review the logs of these applications
and get useful information.
We've deployed a POD hosting an application,
inspect it and wait for it to start.
[?] the kubectl get pods.
We see that it's running.
Let's click on Okay.
Now, a user, USER5, has expressed concerns accessing the application,
identify the cause
and inspect the logs.
Let's take a look at the logs this application.
We see that there are logs here,
and it says USER5.
That's USER5.
We see that the cause is the user failed to log in,
as the account is locked due to too many failed attempts.
It's account locked due to many failed attempts.
That's the correct answer.
The next one is now have
a new application deployed
as webapp-2.
If you see a user is reporting issues while trying to purchase an item,
identify the user and the cause of the issue,
inspect the logs of the webapp.
Let's look at the logs.
Logs again.
Now,
it says a container name must be specified for the pod webapp-2.
This is because, if you look at this,
this web application has two containers, and they're ready.
If there are two containers,
you must specify which container's logs user that we want to see.
There's a simple webapp and there's a db.
We're looking at the web application,
so we'll just specify webapp,
and we can see the logs.
The question is,
a user is reporting issues while trying to purchase an item,
so we've got to identify the user and the cause of the issue.
If you look at this, these are all normal events,
but these are warnings.
Let's look at the warnings.
USER5 failed to log in.
That's not the issue here.
This one says,
USER30 order failed as the item is out of stock.
Those are the only two issues,
this seems to be the correct one.
It's USER30, an item out of stock.
That's a quick lab
for viewing logs of an application.