WEBVTT

00:00.600 --> 00:04.000
In this lab,
we'll get introduced to deployments.

00:04.567 --> 00:05.567
Let us begin.

00:05.693 --> 00:09.053
The first question is,
how many pods exist on the system?

00:09.413 --> 00:12.023
Let's run kubectl get pods command.

00:12.893 --> 00:14.573
We see there are no pods.

00:17.843 --> 00:21.983
The next one is to identify
the number of replica sets.

00:23.393 --> 00:24.518
There are none.

00:24.833 --> 00:26.258
The answer is zero.

00:29.963 --> 00:35.423
Now, it's the number of deployments,
so get deployments.

00:37.853 --> 00:39.353
That's zero as well.

00:41.423 --> 00:42.513
It's a clean environment.

00:42.593 --> 00:46.233
There are no pods, no replica sets,
or deployments at the moment,

00:46.313 --> 00:48.243
but some changes have been made.

00:48.323 --> 00:52.283
We'll now check the deployments again.

00:53.723 --> 00:55.493
There is one deployment.

00:57.323 --> 00:59.011
Okay, so the answer is one.

01:03.413 --> 01:06.063
Now, how many replica
sets exist on the system?

01:06.143 --> 01:08.706
Now, we know that there's one deployment,

01:09.353 --> 01:11.666
you do not know how many replica set.

01:12.293 --> 01:15.783
Let's just run the get Rs command again

01:15.863 --> 01:18.063
to check the number of replica sets.

01:18.143 --> 01:19.683
That's one replica set.

01:19.763 --> 01:22.853
Basically,
the deployment called frontend deployment

01:23.326 --> 01:30.326
has now created a replica set named
frontend deployment, dash, some numbers.

01:31.403 --> 01:36.203
That's the name of the replica set
that the deployment has created.

01:36.743 --> 01:39.563
Then let's also check
the number of pods now.

01:41.483 --> 01:42.963
There are four pods.

01:43.043 --> 01:44.613
Basically, that's what we're trying
to understand here.

01:44.693 --> 01:47.373
There was nothing before,
but when we created a deployment,

01:47.453 --> 01:52.223
it's created a replica set,
and then it's also created four pods.

01:57.923 --> 02:01.193
Now, out of all the existing pods,
how many are ready?

02:01.313 --> 02:06.483
If you look at the status here,
out of four pods, zero already.

02:06.563 --> 02:07.913
Let's select zero.

02:12.143 --> 02:16.253
What is the image used to create
the pods and the new deployment?

02:17.663 --> 02:22.073
Let's take a look at one of the pods
in a bit more detail.

02:23.363 --> 02:24.863
Describe pod

02:27.113 --> 02:28.613
frontend deployment.

02:29.843 --> 02:32.873
Maybe we'll just pick one of the pod.

02:35.513 --> 02:39.483
We see the image used is BusyBox 888.

02:39.563 --> 02:40.913
Let's select that.

02:41.963 --> 02:44.133
Now, I know
that there's a little bit of repetition

02:44.213 --> 02:46.403
between different exercises here,

02:46.583 --> 02:51.653
but this is mainly to get you familiar
with some of these commands,

02:51.893 --> 02:54.423
the get commands and the describe commands.

02:54.503 --> 02:59.453
I promise that we have more fun
stuff coming up in the upcoming labs.

03:00.173 --> 03:01.861
We're just getting started.

03:02.903 --> 03:05.283
Why do you think
the deployment is not ready?

03:05.363 --> 03:07.043
As before, we know that

03:07.467 --> 03:11.367
it's because the image
BusyBox 888 does not exist.

03:11.609 --> 03:12.959
Let's select that.

03:16.493 --> 03:19.653
The next task is to create a new deployment

03:19.733 --> 03:22.673
using the deployment definition,
one file in root.

03:23.843 --> 03:25.493
We're already in root.

03:27.293 --> 03:28.943
Let's check this file.

03:29.273 --> 03:32.993
Let's try to create
the deployment using the file.

03:36.983 --> 03:37.983
It didn't go.

03:38.663 --> 03:41.423
It didn't go through,
so there is some error.

03:41.813 --> 03:46.763
It says, "No kind deployment
is registered for version apps/v1."

03:47.393 --> 03:49.073
If we look at the file,

03:53.603 --> 03:56.287
we see that the API version is app/v1,

03:56.367 --> 03:59.523
which seems to be correct,
but the kind is deployment,

03:59.603 --> 04:03.323
which is also right,
but the issue is that it's case sensitive.

04:03.653 --> 04:08.993
The first character
has to be a capital letter.

04:09.293 --> 04:11.573
That's the standard for kind.

04:12.983 --> 04:17.613
The reason we have these exercises
is just to help you understand

04:17.693 --> 04:24.623
and learn how to know what the issue
is when you come across these errors.

04:25.373 --> 04:28.893
Oftentimes, you'll face
these errors because of these typos

04:28.973 --> 04:34.853
or words not being spelled
correctly or not in the right case.

04:35.153 --> 04:39.473
You should know what those mean
when you see these errors.

04:40.433 --> 04:44.453
There are possibilities that you may mix
up the API version or kind.

04:45.113 --> 04:47.463
We don't want to spend a lot of time

04:47.543 --> 04:52.983
during the exam just
not knowing what those are.

04:53.063 --> 04:56.453
That's the reason for these exercises.

04:57.000 --> 04:58.575
I've just fixed that.

04:59.873 --> 05:02.513
Let's proceed with the creation.

05:05.400 --> 05:06.750
That went through.

05:08.513 --> 05:13.193
The final task is to create
a new deployment with the below attributes.

05:13.373 --> 05:16.983
We have the name, we have the replicas,
and we have the image.

05:17.063 --> 05:21.143
To create an object, we know
we could run the kubectl create command.

05:21.773 --> 05:24.063
This time we want to create a deployment.

05:24.143 --> 05:27.323
Let's take a look at the help for that.

05:27.833 --> 05:29.163
We see there are different options.

05:29.243 --> 05:33.203
You can create a deployment,
specify a name with an image.

05:33.833 --> 05:35.163
We have a name and we have an image.

05:35.243 --> 05:37.713
We also want to specify
the number of replicas.

05:37.793 --> 05:40.223
There is a command just for that.

05:40.913 --> 05:43.233
We have the name,
the image, and the replicas.

05:43.313 --> 05:45.213
That's what we're going to follow.

05:45.293 --> 05:49.100
Run the kubectl create deployment command

05:50.333 --> 05:55.193
and specify the name,
which is httpd-frontend.

06:06.233 --> 06:08.723
The image is--

06:13.613 --> 06:16.153
It's good to create a practice
of just copying and pasting

06:16.233 --> 06:19.383
from the question
as that will also help you with

06:19.463 --> 06:26.303
the exam if you're learning
this for the purpose of giving the exam.

06:26.903 --> 06:28.966
The replicas is the number three.

06:32.483 --> 06:37.373
Also make it a practice,
always verify if what you did is right.

06:37.633 --> 06:39.058
Kubectl get deploy.

06:40.253 --> 06:42.953
We have the httpd frontend deployment.

06:43.193 --> 06:44.873
We also want to make sure

06:49.313 --> 06:51.188
that it goes to a ready state.

06:54.863 --> 06:56.753
Three out of three already.

06:59.603 --> 07:00.653
Check my work.

07:01.823 --> 07:02.587
Okay.

07:02.667 --> 07:03.667
That's done.

07:04.313 --> 07:06.023
That's the end of this lab.

