WEBVTT

00:00.773 --> 00:06.053
In this lab we get familiar with
the monitoring cluster components.

00:07.583 --> 00:09.753
The first question is we've deployed

00:09.833 --> 00:12.583
a few PODs running
workloads so inspect them.

00:12.833 --> 00:15.473
Let's do kubectl get pods command

00:15.953 --> 00:19.623
and we see that there are indeed
three pods, elephant, lion,

00:19.703 --> 00:25.553
and rabbit and they're all in a running
state so let's go ahead.

00:26.123 --> 00:29.420
What we need to do is monitor
the resources consumed

00:29.500 --> 00:31.150
by each of these PODs.

00:31.463 --> 00:34.276
For that,
we need to deploy the metric server.

00:35.213 --> 00:40.853
For this, we have a git repo with
the settings for the metrics-server

00:41.783 --> 00:45.323
that will work for our labs
so we're just going to use that.

00:46.103 --> 00:48.753
If you're trying
this in your own environment

00:48.833 --> 00:54.093
or for a production environment,
remember do not use this for production

00:54.173 --> 00:56.013
use cases because there are changes

00:56.093 --> 00:59.253
that are in here that are done just to make

00:59.333 --> 01:01.773
this work with this particular lab exercise

01:01.853 --> 01:03.723
and just to make it easy for us to deploy

01:03.803 --> 01:07.793
it so do not use
this for a production use-case.

01:08.993 --> 01:12.593
Always remember to refer
to the official documentation

01:12.893 --> 01:17.993
on the metrics server to deploy
one in your environment.

01:20.993 --> 01:24.173
This is cloned, and if you look at this,

01:27.113 --> 01:28.113
you have

01:31.467 --> 01:33.153
the files here that are required

01:33.233 --> 01:35.796
to deploy the metric server, so go ahead.

01:37.583 --> 01:39.853
The next step is to deploy
the metrics server

01:39.933 --> 01:41.993
by creating these components.

01:42.203 --> 01:45.593
We're just going to do kubectl create -f.

01:47.123 --> 01:49.413
And that creates all of the objects

01:49.493 --> 01:51.868
required to deploy the metrics server.

01:55.103 --> 01:56.213
Let's go next.

02:02.123 --> 02:04.673
At times it might take a few minutes

02:06.293 --> 02:09.753
for the metrics servers to start
gathering and reporting data

02:09.833 --> 02:13.233
and so if you do a kubectl top node,

02:14.467 --> 02:17.063
it seems to be working already.

02:18.293 --> 02:21.503
That's working now so we can proceed.

02:24.233 --> 02:28.053
The next question is to identify
the node that consumes the most CPU.

02:28.133 --> 02:32.873
Here you can see two nodes
and the CPU consumption of the two.

02:34.343 --> 02:36.987
Node01 has 57m

02:37.067 --> 02:41.063
and the control plane consumes about 470m.

02:43.193 --> 02:46.433
If you look at it,
the percentage is just 1% but still,

02:46.793 --> 02:49.413
you can see there's a difference
between the two.

02:49.493 --> 02:50.973
Of course, that's because the control plane

02:51.053 --> 02:54.053
has all the control plane
components running on it.

02:54.743 --> 02:55.563
To answer this question,

02:55.643 --> 02:58.773
the most CPU consumption
is by the control plane.

02:59.533 --> 03:00.883
Let's select that.

03:06.653 --> 03:10.443
The next one is to identify the node
that consumes the most memory.

03:10.523 --> 03:12.543
If you look at the memory consumption here,

03:12.623 --> 03:16.163
again we can see
that the control plane consumes

03:17.333 --> 03:21.023
most memory so the answer
to this is control plane again.

03:25.313 --> 03:29.283
The next question is to identify
the POD that consumes the most memory.

03:29.363 --> 03:30.713
The POD this time,

03:31.523 --> 03:34.823
you can get that by running
the kubectl top POD command.

03:35.753 --> 03:39.303
Here you can see the memory
consumption and the CPU consumption.

03:39.383 --> 03:43.353
If you look at the memory consumption,
you can see that it's rabbit.

03:43.433 --> 03:49.343
The rabbit consumes the most memory
so the answer to this is rabbit.

03:55.193 --> 03:59.273
The next question is to identify
the POD that consumes the least CPU.

03:59.783 --> 04:01.471
Here you can see it's lion.

04:02.183 --> 04:06.233
This consumes 1m of CPU, select lion.

04:07.933 --> 04:08.887
That should be it.

04:08.967 --> 04:12.933
Basically, that's a quick introduction
to deploying the metrics-server

04:13.013 --> 04:18.693
and also just using the commands
to look at its reporting

04:18.773 --> 04:20.711
and identify basic information.

04:20.963 --> 04:21.963
Thank you

