9 videos 📅 2024-12-16 09:00:00 Asia/Brunei
2:25:36
2024-12-16 09:21:57
2:03:59
2024-12-16 11:06:33
1:46:52
2024-12-16 13:50:28
1:56:02
2024-12-17 09:35:43
1:52:29
2024-12-17 09:39:32
1:51:17
2024-12-17 13:36:38
1:35:13
2024-12-18 08:59:20
23:23
2024-12-18 11:50:59
1:47:49
2024-12-18 13:41:04

Visit the Docker and Kubernetes Training Course course recordings page

United Arab Emirates - Docker and Kubernetes on AWS

                WEBVTT

00:00:07.880 --> 00:00:14.780
you can you refresh the command such a chance get pods

00:00:18.280 --> 00:00:21.560
you can write the command once more troops will get pods

00:00:22.080 --> 00:00:29.240
ok completed right screen zero still ok do describe the pod

00:00:29.240 --> 00:00:42.660
oops it here K K describe yeah yeah the pod still getting created

00:00:42.660 --> 00:00:51.540
it's still not ready so do get pods again pods now try the top one yeah forget

00:00:51.540 --> 00:00:55.280
about that what other command says you see correct ok maximize the window let's

00:00:55.460 --> 00:01:01.340
so there's some problem in your webnet so can you do not create log into the

00:01:01.340 --> 00:01:09.540
pod a chance what you can do is setting let me show this you want to be

00:01:09.540 --> 00:01:13.620
careful for this so in case you're having some errors are getting it what

00:01:13.620 --> 00:01:19.480
they do is on every node like a work one and work at two ok delete the

00:01:19.480 --> 00:01:24.820
other files also so if you don't even want those plugins and those

00:01:24.820 --> 00:01:33.400
things for example in my worker one you can delete all the files you want to

00:01:33.400 --> 00:01:41.460
delete these files if you want let us there but do not we can see anything

00:01:42.020 --> 00:01:48.960
is it working now Charles are you able to log into the pod

00:01:54.380 --> 00:01:59.980
the master better log in the pod

00:02:08.420 --> 00:02:14.060
once again once again they give a part that is wrong it is hyphen F pod dot

00:02:14.060 --> 00:02:20.780
yaml the create commit is wrong the create command it is wrong it is F

00:02:20.780 --> 00:02:27.420
hyphen F pod not P prod that's the reason nothing's happening yes yeah P

00:02:27.420 --> 00:02:38.660
delete R the file name what you gave is pod correct please Charles the file name is

00:02:38.660 --> 00:02:47.400
pod dot yaml not prod dot yaml remove R under the word remove word letter R

00:02:47.400 --> 00:02:56.280
delete the letter R under prod yes yes yes now do get pods the

00:02:56.280 --> 00:03:00.720
next steps are you getting created correct is getting created or not the

00:03:00.720 --> 00:03:04.900
pod okay so understand so can you go and delete the additional files delete

00:03:04.900 --> 00:03:10.480
the files of the I think it's taking more space or something for some

00:03:10.480 --> 00:03:15.480
reasons but it's still able to log in to log in the pod now log in the pod

00:03:16.060 --> 00:03:21.560
it's a master log into the pod kubectl exec kubectl exec yeah type in the

00:03:21.560 --> 00:03:30.640
command kubectl kubectl k you're not sure short name yeah exec exec space

00:03:30.640 --> 00:03:45.920
hyphen it g-inx space space hyphen hyphen space bash vsh enter in the

00:03:45.920 --> 00:04:06.920
pod okay yeah okay yes Charles are you good yeah you're you're looking to the

00:04:06.920 --> 00:04:12.700
pod you say the pod now pods type in no white yeah it's running so do a get

00:04:12.700 --> 00:04:18.560
log in to the pod now describe kubectl describe the pod and the pod name do

00:04:18.560 --> 00:04:34.480
slowly all the commands

00:04:39.040 --> 00:04:43.000
tapping because of some firewall even I have same problem let's see but you

00:04:43.000 --> 00:04:48.560
have to proceed now let's proceed

00:05:03.300 --> 00:05:03.820
you

00:05:03.820 --> 00:05:07.240
many questions you can ask me inform on this lab is done yeah yeah yeah

00:05:07.240 --> 00:05:15.860
yeah yeah you type in exit enter that's it

00:05:22.260 --> 00:05:28.880
you can next next lab can proceed okay next lab I think she can do yourself

00:05:30.140 --> 00:05:37.080
later we'll do laugh for okay I'm going to explain this everyone please

00:05:37.080 --> 00:05:43.800
listen here very important that for please listen observe and I wanted to

00:05:43.800 --> 00:05:46.620
ask questions okay I want you to think and let me know so can you all

00:05:46.620 --> 00:05:54.180
open laugh for at urine would you all please open lap for okay and I want

00:05:54.180 --> 00:06:00.980
you to say read that lab and tell me what is the name of the part in laugh

00:06:00.980 --> 00:06:06.460
for these open the lap for at urine read and let me know what the name of

00:06:06.460 --> 00:06:14.640
the part look into the M and see and see what the name of the containers

00:06:14.640 --> 00:06:20.860
first and the other container second okay what does this happening what

00:06:20.860 --> 00:06:24.860
exactly this lab is doing now before good what is happening the second

00:06:24.860 --> 00:06:28.060
container the second container what is happening go down and let me know in

00:06:28.060 --> 00:06:30.760
second container what is happening in second contain what is it while you're

00:06:30.760 --> 00:06:37.200
doing okay in Linux what does date date command do type in Linux in date

00:06:37.200 --> 00:06:43.100
command date what will happen so for example if I type in date

00:06:46.380 --> 00:06:51.020
what I'm getting the current time okay this is a hint let me know what's

00:06:55.300 --> 00:07:01.800
happening yes so every second it is writing a date to a HTML file clear

00:07:01.800 --> 00:07:07.900
we're getting it so where is it writing on the top you can see there's

00:07:07.900 --> 00:07:11.560
an empty directory a folder so let me explain now you're getting idea so it

00:07:11.560 --> 00:07:16.040
is going to create a volume of the type empty directory and what the mapping

00:07:16.040 --> 00:07:19.560
you see a map mount path where the mount is getting mounted the first

00:07:19.560 --> 00:07:24.160
container anyone there's a map into the volume what is the path in first

00:07:24.160 --> 00:07:30.200
container see I'm a file mention mount path yes user share in the next

00:07:30.200 --> 00:07:38.520
HTML the second one say slash HTML now I understand diagram so it is

00:07:38.520 --> 00:07:46.820
creating a temporary volume on your host so in whichever node the mark work

00:07:46.820 --> 00:07:51.640
this part get created it will create a temporary storage empty that is your

00:07:51.640 --> 00:07:58.300
storage in the memory and that volume is getting mapped the first container

00:07:58.300 --> 00:08:03.860
in this location the second contains getting mapped to slash HTML so what

00:08:03.860 --> 00:08:08.400
is happening in the second container for example if I make any change under

00:08:08.400 --> 00:08:15.740
this HTML it also gets copied to this volume and the same data is also

00:08:15.740 --> 00:08:20.320
getting mapped to the container the first one so all these three paths are

00:08:20.320 --> 00:08:25.700
in sync getting it this volume and the path and the first is container the

00:08:25.700 --> 00:08:30.860
second container they all are in sync they're working together and they all

00:08:30.860 --> 00:08:35.800
will have the same data let me do a small demo let me do this observe

00:08:35.800 --> 00:08:41.120
I'll give it time so I say now for example shared some name I'm going to

00:08:41.120 --> 00:08:49.980
give and I put an insert mode I copy the

00:08:49.980 --> 00:09:05.960
file and we paste it now I'm going to say apply FNF in a file it will get

00:09:05.960 --> 00:09:11.040
created so now I'll go and check on which node it got created

00:09:11.720 --> 00:09:21.200
getting created on worker to getting error message

00:09:39.100 --> 00:09:43.980
okay might be the image version fine and I'll just a mistake so can we go

00:09:43.980 --> 00:09:46.040
ahead and modify

00:10:04.100 --> 00:10:04.860
you

00:10:10.200 --> 00:10:17.040
it is some problem with this image okay so I think we'll use some other image

00:10:19.920 --> 00:10:23.920
let's let's say same image for both of them

00:10:24.900 --> 00:10:29.880
just take one second let me just check on the image I'm going to your

00:10:29.880 --> 00:10:30.340
index

00:10:56.380 --> 00:10:56.740
you

00:10:56.740 --> 00:11:00.980
only have to create it just write this is it working for you

00:11:25.460 --> 00:11:26.060
you

00:11:26.060 --> 00:11:28.740
is working for you please confirm

00:11:31.340 --> 00:11:35.740
proxy errors are getting network error because of the second node

00:11:39.900 --> 00:11:41.420
because of this error

00:11:49.280 --> 00:11:59.720
let me delete all the parts I go to work at two

00:12:04.280 --> 00:12:07.440
I remove this

00:12:07.440 --> 00:12:19.380
go one is a problem okay on what curve one let me remove the files

00:12:33.680 --> 00:12:39.120
I'm going the fires and then I'm going to go to the master

00:13:06.100 --> 00:13:17.700
let me just check are you able to work is working or no

00:13:23.340 --> 00:13:26.280
okay okay yeah yeah you got proceed let me

00:13:26.280 --> 00:13:32.800
several shoot mine and storage others you're good use is good chance is

00:13:32.800 --> 00:13:35.780
working for you you know modify it he was as good mine I'm getting error

00:13:35.780 --> 00:13:41.020
message let me just check why the reason is both the container getting

00:13:41.020 --> 00:13:42.840
created go and check complete the lab

00:13:49.380 --> 00:13:53.700
some problem in my conference

00:14:09.060 --> 00:14:12.040
to modify to nginx or use Debian

00:14:36.020 --> 00:14:36.580
you

00:14:36.580 --> 00:14:43.600
suppose to do is go to the worker machine where you created go to CD

00:14:43.600 --> 00:14:52.120
var lip cubelet which you know got created go to that node and under

00:14:52.120 --> 00:15:00.660
cubelet you see a folder color parts go to parts do LSF and L and log into

00:15:00.660 --> 00:15:10.500
the latest part going to latest form this way get maps and under that go

00:15:10.500 --> 00:15:24.920
to volumes yeah go to where lip cubelet this path on your node where it got

00:15:24.920 --> 00:15:32.660
created you see a volume folder everyone under that go to volumes the

00:15:32.660 --> 00:15:37.740
latest volume what he created good inside that now in this now if you

00:15:37.740 --> 00:15:43.380
see you have entered that we go into the empty directory folder CD and empty

00:15:43.380 --> 00:15:50.260
directory go inside this this is where you'll see the file it's not working

00:15:50.260 --> 00:15:56.240
for me getting at us do you see your file of what he didn't create you see

00:15:56.240 --> 00:16:01.680
some files there well as everyone gene everyone I see in files on this one

00:16:01.680 --> 00:16:11.820
not this one empty directory you in the wrong folder after are you know

00:16:11.820 --> 00:16:17.260
volumes now no no no you went the wrong worker node you have to see

00:16:17.260 --> 00:16:24.120
which worker node got created your part on the master once again in which

00:16:24.120 --> 00:16:31.340
node your part got created worker to any maximize this you're even a wrong

00:16:31.340 --> 00:16:38.200
maximize this maximize your worker to screen please maximize worker to okay

00:16:38.200 --> 00:16:48.460
here typing clear clear clear look okay now type in CD space dot dot dot dot

00:16:49.140 --> 00:16:55.760
dot dot enter once more CD now do LS hyphen L now you're supposed to be

00:16:56.320 --> 00:17:08.580
just for the third one study a yes go inside it CD CD into that is now do a

00:17:08.580 --> 00:17:19.500
list CD volumes CD volumes yeah now LS yes now with the first one CD the

00:17:19.500 --> 00:17:25.460
entry directory two minutes type in E and tap yeah enter do LS enter now go

00:17:25.460 --> 00:17:32.120
inside this CD space HTML okay do LS do a cat of this file cat yes got it

00:17:32.120 --> 00:17:35.420
everyone once again a gene is look everyone are able to understand now

00:17:35.420 --> 00:17:41.580
what you do is try to create some file in here type typing clear type

00:17:41.580 --> 00:17:53.940
clear create a file touch touch the T O U T S touch word T O U C H O U O O U

00:17:53.940 --> 00:18:03.920
C H space space give a file host dot T X T type in H O S T dot T X T okay

00:18:04.520 --> 00:18:13.080
right now minimize this now go to your master now QCTL exec log into the pod

00:18:13.080 --> 00:18:31.780
Q log into the pod QCTL exec exec C minus minus space hyphen C hyphen C C

00:18:31.780 --> 00:18:42.140
space first first container space yes space no no no use of the space hyphen

00:18:42.140 --> 00:18:49.980
hyphen space bash enter the first container the first kind of as a path

00:18:49.980 --> 00:19:00.900
so CD forward slash user user share engine X HTML enter do a list now so

00:19:00.900 --> 00:19:06.040
you see the file now which came from there again understanding so now try

00:19:06.040 --> 00:19:18.020
to get a file in here say touch type in touch what first dot dot dot now go

00:19:18.020 --> 00:19:25.180
to the worker node the good worker node do LS you see the file coming in

00:19:25.180 --> 00:19:30.100
understanding now again go back I mean again go to master now exit out of

00:19:31.880 --> 00:19:39.680
log in the second container enter use the apparel and instead of C first use

00:19:39.680 --> 00:19:42.740
second so in this you're supposed to go to which part will go to which

00:19:42.740 --> 00:19:48.880
part is under slash HTML right HTML no no no just HTML see the lab no no

00:19:48.880 --> 00:19:57.680
forward slash do a CD dot dot yeah see CD yes HTML not coming in do a

00:19:57.680 --> 00:20:05.820
yes you see the file is coming in understanding all these are in sync if

00:20:05.820 --> 00:20:08.720
we get a file in here it will also effect in a first container as well as

00:20:08.720 --> 00:20:15.680
near center are we good everyone this is a simple example about how you can

00:20:15.680 --> 00:20:20.980
it is bash yes such a space after hyphen hyphen one space and then bash

00:20:20.980 --> 00:20:28.100
CD forward slash user USR forward slash share forward slash

00:20:28.100 --> 00:20:35.820
engineer forward slash HTML and press enter now do LS yeah this is a file so

00:20:35.820 --> 00:20:41.200
make some changes in here you'll see this is this file yeah do T O U C H

00:20:41.200 --> 00:20:48.340
you T O U C H yeah give a name like first dot txt yes and now go to the

00:20:48.340 --> 00:20:53.480
where it got created that location go and check the file is there okay I'm

00:20:53.480 --> 00:20:59.400
getting it are we clear everyone we can take some two more minutes and play

00:20:59.400 --> 00:21:02.300
around concepts more one chance the concept then it will be very easy for

00:21:02.300 --> 00:21:06.380
you to do the hands-on yeah the mount the mount path is different but they

00:21:06.860 --> 00:21:10.720
are using the same volume so you can define any mount path it's up to you

00:21:10.720 --> 00:21:15.420
for example the first container I wanted that path because I found that

00:21:15.420 --> 00:21:20.720
was very critical this more so mount cut to the different but the both are

00:21:20.720 --> 00:21:26.480
getting mounted the same volume getting it the volume name is the same but

00:21:26.480 --> 00:21:29.060
they are getting mapped from a different mount path what's your

00:21:29.060 --> 00:21:37.960
question please yes yeah yes yes yeah it is because for example your

00:21:37.960 --> 00:21:43.000
engine X you might want a some other file this is a different debian you

00:21:43.000 --> 00:21:47.760
might want some other file to be mounted depends on where is your file

00:21:47.760 --> 00:21:54.020
which you want to map which part any part could be there's up to you but

00:21:54.020 --> 00:22:01.620
those parts will be available so now delete the part delete the part and

00:22:01.620 --> 00:22:08.940
observe what happens to the storage on the host do you assume and observe

00:22:08.940 --> 00:22:12.740
what happens to the storage on the worker nodes but what is happening to

00:22:51.340 --> 00:23:00.380
the storage are we good everyone so you see once deleted what happens you

00:23:00.380 --> 00:23:03.940
will not find the details in that mount path you agree everyone is

00:23:03.940 --> 00:23:12.220
limited JP yeah yes there is a pod MC1 and go to work worker 2 and see

00:23:12.220 --> 00:23:17.600
whether do you see that fights now on the worker know why exit if I'm

00:23:17.600 --> 00:23:21.520
logging back so once you're done what is an option did you see that

00:23:21.520 --> 00:23:26.700
contents and gene yeah yeah I'll be done the fights are not good long be

00:23:26.700 --> 00:23:30.160
there the fights will not be there once you delete your part you

00:23:30.160 --> 00:23:36.380
observe it and not like that no no no one second one here I see

00:23:36.380 --> 00:23:49.360
the CD CD for slash where var var forced as live live be cubit you be

00:23:49.360 --> 00:23:54.940
LED LED yes yes now go inside the point you'll not have a part now CD

00:23:54.940 --> 00:24:03.380
parts and do LS now you see that you don't have that is gone you don't

00:24:03.700 --> 00:24:11.460
at all do LS FNL you has a study a remember you don't see the part at all

00:24:11.460 --> 00:24:15.740
is gone the part is not there so it means that you'll lose the data to

00:24:15.740 --> 00:24:22.080
delete the part here of this time okay others are we good so I'm trying

00:24:22.080 --> 00:24:28.300
to do it on my local mission because of errors any questions you can ask me

00:24:52.980 --> 00:24:56.000
one minute others any questions

00:25:20.140 --> 00:25:20.620
you

00:25:28.440 --> 00:25:33.680
so see I mean so wrong am I in the dormant and you see that everything is

00:25:33.680 --> 00:25:34.120
Good.

00:25:34.420 --> 00:25:37.340
I'm not sure if there is some challenge in here.

00:25:38.400 --> 00:25:39.060
So, OK.

00:25:40.240 --> 00:25:41.140
Next lab, everyone.

00:25:41.640 --> 00:25:42.220
Next topic.

00:25:42.540 --> 00:25:42.700
OK.

00:25:42.960 --> 00:25:43.580
So I've done it.

00:25:43.800 --> 00:25:46.180
I'm going to use my network because I'm not

00:25:46.180 --> 00:25:47.500
going to use this.

00:25:47.560 --> 00:25:48.420
You see, it works.

00:25:48.560 --> 00:25:49.260
Everything's fine.

00:25:50.100 --> 00:25:51.740
Something is happening in the back end.

00:25:51.740 --> 00:25:52.300
I'm not sure.

00:25:52.440 --> 00:25:53.200
But everything is fine.

00:25:53.220 --> 00:25:54.640
I'm just going to do it at my end

00:25:54.640 --> 00:25:56.100
so that it acts as output.

00:25:56.940 --> 00:25:58.860
So we talked about this is done.

00:25:59.460 --> 00:26:00.220
The next topic.

00:26:00.220 --> 00:26:04.160
Now, could you tell me, is there

00:26:04.160 --> 00:26:06.840
any disadvantages of using pod?

00:26:06.920 --> 00:26:07.960
OK, let me give an example.

00:26:08.900 --> 00:26:10.980
So let's consider right now, we

00:26:10.980 --> 00:26:13.980
created some pod on a worker node.

00:26:13.980 --> 00:26:16.900
We have a pod, which is a container.

00:26:18.820 --> 00:26:21.580
Now, what if this pod goes down?

00:26:21.640 --> 00:26:22.900
What will happen to the application?

00:26:23.220 --> 00:26:26.040
So we need to create multiple pods.

00:26:27.240 --> 00:26:27.440
Do you agree?

00:26:27.440 --> 00:26:30.640
So now, I have to create a manual pod again.

00:26:30.640 --> 00:26:33.420
I cannot create two pods at once.

00:26:33.880 --> 00:26:34.600
Are you understanding?

00:26:35.800 --> 00:26:38.720
In a kind as a pod, I can create only one pod at once.

00:26:38.840 --> 00:26:40.580
I have to again run the command to create a pod.

00:26:41.200 --> 00:26:42.160
So I cannot.

00:26:42.520 --> 00:26:46.660
The challenge with a kind pod is multiple pods cannot

00:26:46.660 --> 00:26:51.180
be created at once.

00:26:51.280 --> 00:26:52.400
I have to again do it manually.

00:26:52.400 --> 00:26:56.480
Now, if I have two pods and the load is more,

00:26:57.500 --> 00:26:58.920
I cannot scale up the pods.

00:26:59.280 --> 00:27:01.920
So I cannot scale up.

00:27:02.320 --> 00:27:04.420
I cannot make it five or scale down.

00:27:04.640 --> 00:27:10.180
If you're having a pod with a version one,

00:27:10.680 --> 00:27:13.940
and you want to update this to V2, a new version,

00:27:14.160 --> 00:27:18.140
and do this, there will be some downtime would be there

00:27:18.840 --> 00:27:20.220
in your kind pod.

00:27:21.300 --> 00:27:24.020
And all these are very important when

00:27:24.020 --> 00:27:25.320
you have a live application.

00:27:25.400 --> 00:27:26.900
Because tomorrow, you might want

00:27:26.900 --> 00:27:28.500
to create multiple pods at once.

00:27:29.120 --> 00:27:31.480
You might want to scale up the pods because load is more.

00:27:31.920 --> 00:27:34.900
You might want to do any updates without having

00:27:34.900 --> 00:27:35.640
any downtime.

00:27:37.020 --> 00:27:40.740
So this example of a kind pod, just to start off,

00:27:40.940 --> 00:27:43.480
but we actually create pods with different methods,

00:27:43.500 --> 00:27:44.580
which is your deployments.

00:27:45.760 --> 00:27:49.780
So deployment is a method using which we create the pods.

00:27:49.780 --> 00:27:51.500
Which is highly available.

00:27:51.960 --> 00:27:53.380
And you can scale up your pod.

00:27:53.820 --> 00:27:54.840
You can do updates.

00:27:55.060 --> 00:27:55.640
You can pause.

00:27:55.800 --> 00:27:57.660
You can do all the operations if you

00:27:57.660 --> 00:27:59.120
use a kind as deployment.

00:28:01.260 --> 00:28:03.740
So what I'm saying here is, if you want to create a pod,

00:28:03.900 --> 00:28:07.160
the better method to create a pod using a kind deployment.

00:28:08.080 --> 00:28:13.100
So example, you want to create something like this,

00:28:13.120 --> 00:28:13.400
name.

00:28:14.580 --> 00:28:16.820
So now, the difference between this.

00:28:16.880 --> 00:28:17.860
So kind is deployment.

00:28:18.700 --> 00:28:20.060
Now, what is three here?

00:28:20.240 --> 00:28:20.820
What will three do?

00:28:21.020 --> 00:28:22.500
This answer, please think.

00:28:22.600 --> 00:28:23.560
Because we have to answer this question.

00:28:23.560 --> 00:28:24.180
I give a hint.

00:28:25.080 --> 00:28:25.720
What are the three?

00:28:25.860 --> 00:28:27.320
Yes, we'll create three pods.

00:28:28.220 --> 00:28:30.280
And each pod will be having this container.

00:28:31.860 --> 00:28:35.080
So I don't have an option of matching replicas, option

00:28:35.080 --> 00:28:35.820
and kind of support.

00:28:37.400 --> 00:28:38.980
So you're talking something like this now.

00:28:39.340 --> 00:28:41.540
So it means I can scale and create multiple pods.

00:28:42.240 --> 00:28:43.460
And tomorrow, I want to scale up.

00:28:43.520 --> 00:28:44.560
For example, I have three pods.

00:28:44.960 --> 00:28:46.900
I can scale to scale up to five.

00:28:47.860 --> 00:28:50.600
It will become from three to five, increase automatically.

00:28:51.620 --> 00:28:53.740
If I want to scale down, I can scale down to one.

00:28:54.500 --> 00:28:57.980
All these operations is what your deployment would

00:28:57.980 --> 00:28:59.800
allow you to do it.

00:29:00.620 --> 00:29:03.340
That's what we are talking about now, the next topic.

00:29:06.300 --> 00:29:08.420
So for doing this, first you need to understand about

00:29:08.420 --> 00:29:08.720
labels.

00:29:09.760 --> 00:29:10.400
What are labels?

00:29:10.920 --> 00:29:12.960
So labels are key value pairs.

00:29:13.520 --> 00:29:15.680
So you give some names for the pods,

00:29:15.680 --> 00:29:18.580
like app equal to blue in here.

00:29:19.180 --> 00:29:21.920
So tomorrow, if you want to do some operations on different

00:29:21.920 --> 00:29:24.720
applications, you can do some filtering.

00:29:24.780 --> 00:29:26.700
So I can get in the pod which I wanted.

00:29:27.260 --> 00:29:28.480
And I want to a patch.

00:29:28.680 --> 00:29:31.900
So I want to a patch of this particular pod, which has

00:29:31.900 --> 00:29:32.520
the label name.

00:29:33.320 --> 00:29:34.620
Or I want a building of it.

00:29:34.720 --> 00:29:36.320
I can do a filtering like this.

00:29:36.680 --> 00:29:37.700
This is called a selector.

00:29:38.720 --> 00:29:40.320
So we can define labels.

00:29:40.760 --> 00:29:43.880
And we can define selectors.

00:29:44.600 --> 00:29:49.460
So labels are key value pairs that we can attach to objects

00:29:49.460 --> 00:29:53.080
such as pods or the nodes we can attach.

00:29:53.660 --> 00:29:58.240
And all these are some recommended key and value

00:29:58.240 --> 00:30:02.340
pairs, which is recommended by Amazon, working on release,

00:30:03.120 --> 00:30:07.000
environment, here, partition, all these.

00:30:08.300 --> 00:30:09.380
So how do you create it?

00:30:10.100 --> 00:30:11.320
This is syntax for the labels.

00:30:11.460 --> 00:30:12.900
And this is what they say.

00:30:12.900 --> 00:30:14.000
Now, can you create labels?

00:30:14.200 --> 00:30:16.420
Yes, you have multiple labels, method to create a label.

00:30:16.440 --> 00:30:17.160
Let me do a demo.

00:30:17.280 --> 00:30:19.800
So in this pod, you're going to create the pod

00:30:19.800 --> 00:30:21.440
with this name, with these two labels.

00:30:21.800 --> 00:30:22.560
Let me do this.

00:30:22.740 --> 00:30:25.160
Let me, and even you can try to do this.

00:30:25.660 --> 00:30:28.660
So try to create YAML of this.

00:30:29.000 --> 00:30:32.520
And try to get a pod from this.

00:30:33.520 --> 00:30:35.940
So go ahead on the master machine.

00:30:37.500 --> 00:30:38.800
Try to create a pod of this.

00:30:38.840 --> 00:30:42.580
So you can say label pod dot YAML.

00:30:42.580 --> 00:30:43.400
And you paste it.

00:30:43.520 --> 00:30:50.960
Now, I'm going to say apply FNF label the pod name.

00:30:51.080 --> 00:30:52.240
Now, the pod has got created.

00:30:52.740 --> 00:30:56.520
I would say get pods FNO and YAML.

00:30:56.920 --> 00:31:01.520
So now, I can use a command, see, show labels.

00:31:01.740 --> 00:31:05.640
This will show the labels of this.

00:31:06.920 --> 00:31:08.340
Now, I'll take one more pod.

00:31:08.360 --> 00:31:10.840
For example, I just create a pod, like an example,

00:31:10.840 --> 00:31:12.620
the image of Nginx, for example.

00:31:12.640 --> 00:31:15.220
If I say get pods, show labels,

00:31:16.260 --> 00:31:17.540
it is showing for both the pods.

00:31:17.560 --> 00:31:18.560
This comes by default.

00:31:18.600 --> 00:31:19.660
This is specific.

00:31:19.820 --> 00:31:26.980
Now, I can also say a label F equals Nginx.

00:31:27.500 --> 00:31:29.560
So it's going to filter the pod

00:31:29.560 --> 00:31:30.940
and show only this pod.

00:31:31.080 --> 00:31:32.180
Did you get it, everyone?

00:31:32.340 --> 00:31:32.680
Are you getting it?

00:31:32.740 --> 00:31:33.420
There's a filter.

00:31:34.060 --> 00:31:35.100
What is equal to?

00:31:35.360 --> 00:31:36.220
What is the symbol?

00:31:37.780 --> 00:31:38.600
What is the symbol?

00:31:38.660 --> 00:31:39.520
What is the symbol of?

00:31:39.640 --> 00:31:40.380
What is the symbol?

00:31:40.380 --> 00:31:41.920
What do you call the symbol as?

00:31:42.040 --> 00:31:44.420
If this is equal, what will not equal to?

00:31:45.240 --> 00:31:47.560
So now, I'm going to do a not equal to.

00:31:47.580 --> 00:31:50.800
So it will give me all which is not matching it.

00:31:50.960 --> 00:31:52.500
It's giving me the other pod.

00:31:54.040 --> 00:31:54.480
Are you getting it?

00:31:54.500 --> 00:31:58.980
So we can use these operators for equal to, not equal to.

00:32:00.240 --> 00:32:01.580
This is how you can do a filtering.

00:32:01.980 --> 00:32:04.340
So you can do equal to, not equal to.

00:32:04.400 --> 00:32:07.020
You can use for operators and operators.

00:32:07.640 --> 00:32:09.480
All these are called as selectors.

00:32:09.480 --> 00:32:11.280
Are you understanding what are labels and selectors?

00:32:12.220 --> 00:32:14.880
Now, I can also create one more label manually.

00:32:15.080 --> 00:32:16.100
So let me show.

00:32:16.220 --> 00:32:17.280
So for example, create a label.

00:32:17.820 --> 00:32:19.800
So I can say, this is my pod.

00:32:21.040 --> 00:32:23.120
Only a label for example, for example.

00:32:23.220 --> 00:32:24.240
I want additional label.

00:32:24.760 --> 00:32:28.680
So I can say, label, the pod,

00:32:30.300 --> 00:32:32.800
and the pod name, example.

00:32:33.540 --> 00:32:36.200
Then you can say, I want to give a label,

00:32:37.140 --> 00:32:42.200
and you can give a label with this hyphen E and V

00:32:43.300 --> 00:32:45.180
equal to prod, it's got label.

00:32:45.700 --> 00:32:50.620
So now, if I say get pods, hyphen hyphen show labels,

00:32:52.380 --> 00:32:55.200
you see that it also got one more label.

00:32:55.340 --> 00:32:57.000
If you don't want the label, for example,

00:32:57.100 --> 00:32:58.440
I can just same command.

00:32:59.280 --> 00:33:04.140
And in the end, I can just say hyphen with a key.

00:33:05.520 --> 00:33:07.340
It is unlabeled here.

00:33:09.220 --> 00:33:14.200
So like this, you can define multiple labels.

00:33:16.840 --> 00:33:17.220
Are we good?

00:33:17.320 --> 00:33:18.080
Label is gone.

00:33:19.080 --> 00:33:21.560
Just use the syntax.

00:33:23.860 --> 00:33:25.660
Okay, I think you want to do a lab.

00:33:26.160 --> 00:33:27.760
I don't think lab is there for this.

00:33:27.960 --> 00:33:29.580
Are you understanding what are labels and selectors?

00:33:29.680 --> 00:33:30.140
Are you good?

00:33:32.340 --> 00:33:32.820
Okay.

00:33:34.860 --> 00:33:36.160
It's going to help you a lot.

00:33:37.480 --> 00:33:39.020
So what happened in the deployment?

00:33:40.460 --> 00:33:43.560
So when you write a YAML file of a kind deployment,

00:33:45.160 --> 00:33:48.420
and when you apply, when you apply the YAML file,

00:33:48.460 --> 00:33:49.800
when the request goes first,

00:33:50.560 --> 00:33:54.220
to which component the request goes first in master.

00:33:54.340 --> 00:33:55.900
Just think, you're writing a YAML file

00:33:55.900 --> 00:33:57.280
and apply where the request goes

00:33:57.280 --> 00:33:58.540
to which component in master.

00:34:00.140 --> 00:34:01.280
API, do you agree?

00:34:01.460 --> 00:34:03.340
As for this diagram, it will go to next

00:34:03.340 --> 00:34:04.880
after you go to controller manager.

00:34:07.080 --> 00:34:10.620
The controller manager would create the replica set.

00:34:11.640 --> 00:34:15.020
And then the replica set in turn uses scheduler

00:34:15.020 --> 00:34:16.480
to create the pod.

00:34:17.720 --> 00:34:20.140
So this could be your worker one, for example.

00:34:21.180 --> 00:34:22.700
And this is your worker two.

00:34:22.740 --> 00:34:23.680
So the replica set.

00:34:24.120 --> 00:34:25.720
So since you asked for three,

00:34:26.300 --> 00:34:29.580
the replica set would remember that you asked for three.

00:34:29.580 --> 00:34:31.580
And if something happens to this,

00:34:31.780 --> 00:34:35.340
the cubelet would immediately inform the problem

00:34:35.340 --> 00:34:38.060
and a new pod would come immediately.

00:34:38.180 --> 00:34:39.520
That's what the replica set is.

00:34:39.980 --> 00:34:44.060
So the replica set would remember there's a problem.

00:34:44.360 --> 00:34:46.060
So in this case, example,

00:34:48.020 --> 00:34:51.180
if your pod went down, what will happen?

00:34:51.360 --> 00:34:52.940
Let me explain once more.

00:34:53.540 --> 00:34:56.300
So in this case, we have worker one

00:34:56.300 --> 00:34:57.880
in which we have this one.

00:34:58.600 --> 00:34:59.560
Worker one.

00:34:59.900 --> 00:35:01.220
You'll also have a cubelet.

00:35:01.300 --> 00:35:03.300
This could be your worker two.

00:35:04.320 --> 00:35:06.500
You have cubelet, the node.

00:35:07.400 --> 00:35:08.720
Now this goes down.

00:35:09.400 --> 00:35:11.260
Cubelet will understand there's a problem.

00:35:11.460 --> 00:35:14.300
It'll go and inform to API.

00:35:15.620 --> 00:35:18.280
It'll go and contact the controller manager.

00:35:20.120 --> 00:35:21.700
Controller manager will check on the replica set.

00:35:21.880 --> 00:35:23.520
So replica set says that three.

00:35:23.800 --> 00:35:27.060
So it was value was set as desired was three,

00:35:27.060 --> 00:35:28.640
current was three before.

00:35:28.920 --> 00:35:30.000
This is what is said in the memory.

00:35:30.780 --> 00:35:31.960
But right now it is not.

00:35:32.560 --> 00:35:34.120
It'll understand there's some problem

00:35:34.120 --> 00:35:36.980
because desired is not even current right now.

00:35:38.040 --> 00:35:40.860
So it'll again take the help of scheduler.

00:35:42.560 --> 00:35:44.220
And scheduler will inform the API

00:35:44.220 --> 00:35:45.300
that you're going ahead

00:35:45.300 --> 00:35:47.760
and it'll go ahead and create a pod

00:35:47.760 --> 00:35:49.200
immediately on that node.

00:35:50.180 --> 00:35:51.880
This is what replica set does.

00:35:52.760 --> 00:35:55.620
Replica set ensures that any time the numbers,

00:35:55.620 --> 00:35:58.160
what was there, is going to match.

00:35:58.840 --> 00:36:00.240
So even the pod goes down,

00:36:00.280 --> 00:36:02.940
it'll come up automatically because of replica set.

00:36:04.500 --> 00:36:05.660
That'll be good.

00:36:09.500 --> 00:36:10.000
Everyone.

00:36:14.960 --> 00:36:15.800
Yes, no?

00:36:16.320 --> 00:36:16.640
Questions?

00:36:20.120 --> 00:36:21.840
Now let's do a lab on this.

00:36:22.600 --> 00:36:24.920
Now the first one in lab three,

00:36:24.920 --> 00:36:25.980
I'll explain this.

00:36:26.580 --> 00:36:28.460
There are two methods to create a deployment.

00:36:29.760 --> 00:36:31.260
One is the imperative method

00:36:31.260 --> 00:36:33.320
in which you create deployment,

00:36:33.860 --> 00:36:35.820
deployment name, the image,

00:36:35.940 --> 00:36:37.740
and how many pods you want,

00:36:38.320 --> 00:36:40.480
and which pod you want to expose internally.

00:36:41.720 --> 00:36:42.440
They create it.

00:36:42.900 --> 00:36:44.820
So we'll go ahead and see it.

00:36:46.820 --> 00:36:48.600
Scalar will create two more pods.

00:36:48.760 --> 00:36:49.900
We'll observe it.

00:36:50.080 --> 00:36:51.240
Then let's first do this.

00:36:52.120 --> 00:36:54.460
So go ahead and run the first command.

00:36:54.460 --> 00:36:55.820
Before you do this,

00:36:56.120 --> 00:36:57.160
to avoid confusions,

00:36:57.840 --> 00:36:58.660
delete all the pods.

00:36:58.940 --> 00:37:03.780
So say delete pods hyphenate and all.

00:37:05.420 --> 00:37:06.300
So type in,

00:37:08.260 --> 00:37:10.960
delete pods hyphenate and all.

00:37:11.020 --> 00:37:12.220
And now run the command

00:37:12.920 --> 00:37:15.440
and see what happens in the back end.

00:37:15.440 --> 00:37:16.100
Got created.

00:37:17.220 --> 00:37:22.980
So you can get deployment or deploy hyphen over y.

00:37:22.980 --> 00:37:27.080
Get deployment or deploy hyphen over y.

00:37:27.200 --> 00:37:28.580
You see that there are two copies.

00:37:28.700 --> 00:37:31.080
Again, you can say get RS.

00:37:31.500 --> 00:37:32.360
It is a Replicaset.

00:37:32.360 --> 00:37:33.120
It's created too.

00:37:33.160 --> 00:37:34.000
So how do you know this?

00:37:34.340 --> 00:37:37.420
This deployment created your Replicaset.

00:37:37.500 --> 00:37:41.000
And again, you can say get pods hyphen over y.

00:37:41.200 --> 00:37:41.780
You see it's got.

00:37:43.640 --> 00:37:47.120
So deployment created your Replicaset

00:37:47.120 --> 00:37:49.680
and Replicaset in turn created the pod.

00:37:49.780 --> 00:37:51.560
How do you know this is a naming conventions?

00:37:51.560 --> 00:37:52.940
Sorry, I'm getting error.

00:37:54.440 --> 00:37:55.480
Okay, let me see your screen.

00:37:57.600 --> 00:37:58.760
So can you,

00:38:00.060 --> 00:38:02.080
that's what, there is some network problems

00:38:02.080 --> 00:38:02.700
that you can have.

00:38:02.940 --> 00:38:03.640
I'm not having them.

00:38:04.000 --> 00:38:06.920
So can you go to worker1 machine?

00:38:07.260 --> 00:38:07.640
Do ls.

00:38:07.700 --> 00:38:09.060
Can delete the files.

00:38:10.640 --> 00:38:13.520
rm, rm minus, no, no, no.

00:38:13.920 --> 00:38:17.360
rm minus rf, rf, yeah.

00:38:17.720 --> 00:38:19.420
Space, just type in cni.

00:38:21.340 --> 00:38:22.540
Yeah, enter.

00:38:24.020 --> 00:38:28.220
rm minus rf, container d, yes.

00:38:28.480 --> 00:38:29.900
Tab, tab, tab.

00:38:30.340 --> 00:38:32.320
Not that side, just type in tab.

00:38:32.940 --> 00:38:33.900
Don't do that.

00:38:34.140 --> 00:38:35.500
Not this one, yes.

00:38:36.260 --> 00:38:38.120
Tab, test tab.

00:38:39.900 --> 00:38:40.960
The first one, hyphen.

00:38:41.080 --> 00:38:42.420
Just type in hyphen 1.6.

00:38:44.620 --> 00:38:45.420
Yeah, delete this.

00:38:47.460 --> 00:38:48.580
Okay, now go back.

00:38:49.420 --> 00:38:50.500
To the master.

00:38:50.700 --> 00:38:52.320
So kubectl, delete the pods.

00:38:52.440 --> 00:38:56.580
Yeah, delete the pods, hyphen o, hyphen.

00:38:56.800 --> 00:38:57.600
All, yeah.

00:38:57.780 --> 00:38:58.580
All, all.

00:38:58.980 --> 00:38:59.580
Yeah, enter.

00:38:59.820 --> 00:39:00.120
That's fine.

00:39:00.220 --> 00:39:00.480
We'll go up.

00:39:00.580 --> 00:39:01.720
We'll again come back.

00:39:01.900 --> 00:39:04.660
kubectl, kubectl.

00:39:05.840 --> 00:39:06.600
kubectl, kubectl.

00:39:06.780 --> 00:39:06.840
kubectl, kubectl.

00:39:07.760 --> 00:39:08.780
kubectl, kubectl.

00:39:12.220 --> 00:39:13.420
kubectl, kubectl.

00:39:14.560 --> 00:39:15.620
kubectl, kubectl.

00:39:18.140 --> 00:39:19.340
kubectl, kubectl.

00:39:21.660 --> 00:39:25.120
Because of the storage issue.

00:39:26.000 --> 00:39:28.020
Okay, let me.

00:39:28.880 --> 00:39:31.700
I'm going to log in and increase the storage.

00:39:32.540 --> 00:39:33.060
Yeah, proceed.

00:39:42.720 --> 00:39:47.280
Ifcon, ifconfig, apt install, apt install, run command.

00:39:48.440 --> 00:39:49.940
No, no, no, no, no hyphen.

00:39:50.280 --> 00:39:50.720
Net hyphen tools.

00:39:51.040 --> 00:39:51.220
Run that command.

00:39:51.320 --> 00:39:52.080
What is seen on the top?

00:39:52.180 --> 00:39:53.980
It just says the exact command.

00:39:55.120 --> 00:39:55.960
Run that command.

00:39:56.100 --> 00:39:57.220
Space net hyphen tools.

00:39:57.320 --> 00:39:58.700
You see the command says that?

00:39:59.180 --> 00:39:59.900
Run that command.

00:40:00.100 --> 00:40:00.960
Net hyphen tools.

00:40:01.140 --> 00:40:02.180
Yeah, choose enter.

00:40:03.900 --> 00:40:04.220
Yeah.

00:40:04.920 --> 00:40:06.360
Now type in ifconfig.

00:40:06.480 --> 00:40:07.340
The top go up.

00:40:07.400 --> 00:40:08.160
Go up on the top.

00:40:09.120 --> 00:40:09.740
Up, up.

00:40:09.940 --> 00:40:10.280
No, no, no.

00:40:11.220 --> 00:40:12.140
The output, what do you call it?

00:40:12.140 --> 00:40:13.060
Up, up on this.

00:40:13.240 --> 00:40:13.460
Up.

00:40:13.980 --> 00:40:14.780
Yeah, go up.

00:40:14.780 --> 00:40:18.920
What was 172, 20, 0.1.

00:40:19.160 --> 00:40:19.580
That one.

00:40:19.840 --> 00:40:20.780
Come down, come down.

00:40:22.340 --> 00:40:22.940
Come down.

00:40:23.300 --> 00:40:23.780
Yeah.

00:40:24.180 --> 00:40:26.240
172, 31, 27.

00:40:26.400 --> 00:40:27.140
One second.

00:40:31.020 --> 00:40:31.980
172, 31.

00:40:33.460 --> 00:40:34.500
Is this a 192 ending?

00:40:34.860 --> 00:40:35.400
Yeah, yeah.

00:40:35.540 --> 00:40:38.080
20, 31, 27, 192.

00:40:38.100 --> 00:40:39.340
So I'm going to increase the storage.

00:40:39.700 --> 00:40:41.040
Let me check if I can add it.

00:40:41.360 --> 00:40:43.160
Okay, I don't have permission to do it.

00:40:44.460 --> 00:40:45.420
Okay, please proceed.

00:40:45.580 --> 00:40:47.500
Let me check in the break about how to do it.

00:40:48.060 --> 00:40:49.480
Is it running now?

00:40:49.700 --> 00:40:51.220
The master, both the bots?

00:40:51.440 --> 00:40:51.820
Please check.

00:40:51.940 --> 00:40:52.280
That's fine.

00:40:53.120 --> 00:40:53.480
Proceed.

00:40:54.480 --> 00:40:55.000
That's fine.

00:40:55.100 --> 00:40:55.880
We got it created.

00:40:57.640 --> 00:40:58.260
Others, are you?

00:40:58.560 --> 00:40:58.920
Yes.

00:40:59.140 --> 00:40:59.740
Are you do it?

00:40:59.780 --> 00:41:00.580
Others, are you good?

00:41:00.740 --> 00:41:02.540
Tell them to increase the storage, the backend.

00:41:13.180 --> 00:41:15.100
Are we good with the first one?

00:41:16.640 --> 00:41:18.260
So now, please observe the screen.

00:41:18.280 --> 00:41:19.660
I'm going to do the next steps.

00:41:20.080 --> 00:41:20.120
Observe.

00:41:20.180 --> 00:41:21.560
So now we have two bots.

00:41:22.100 --> 00:41:23.280
Please observe right now.

00:41:24.520 --> 00:41:26.800
So now, when I do a describe

00:41:28.980 --> 00:41:31.360
of deployment, and you would see that

00:41:31.360 --> 00:41:32.700
it created a replica set.

00:41:34.180 --> 00:41:36.960
So the deployment is creating a replica set.

00:41:37.680 --> 00:41:38.540
Backend team is calling.

00:41:38.800 --> 00:41:39.220
Yes, sir?

00:41:41.400 --> 00:41:42.340
Yeah, yeah.

00:41:43.160 --> 00:41:43.540
Yes.

00:41:47.200 --> 00:41:48.480
Yes, yes.

00:41:48.780 --> 00:41:49.340
Hi, Raghav.

00:41:50.900 --> 00:41:53.920
Raghav, they're getting errors in between

00:41:53.920 --> 00:41:55.560
for some bots.

00:41:55.880 --> 00:41:57.540
They're not, when they get a bot,

00:41:58.140 --> 00:42:00.160
it says error, it cannot create.

00:42:01.180 --> 00:42:03.180
These are the errors we're getting in.

00:42:03.820 --> 00:42:05.160
And some, it's an intimate issue.

00:42:05.520 --> 00:42:10.980
There is something blocking sometime in between.

00:42:11.440 --> 00:42:12.200
I'm not sure.

00:42:12.200 --> 00:42:14.520
If you want, you can join the session and see.

00:42:14.660 --> 00:42:16.820
For example, I'm able to do it on my laptop.

00:42:17.020 --> 00:42:18.740
There's something, a session,

00:42:19.040 --> 00:42:20.700
or from Nobleprog, I'm not sure.

00:42:21.140 --> 00:42:21.820
Yeah, yeah.

00:42:22.800 --> 00:42:23.320
Nobleprog.

00:42:26.200 --> 00:42:27.240
That's it.

00:42:29.580 --> 00:42:30.620
Everything is,

00:42:31.160 --> 00:42:32.760
they're not able to reach.

00:42:32.920 --> 00:42:35.460
The TCP port is all inbound and all outbound is open.

00:42:36.760 --> 00:42:37.040
Right.

00:42:37.860 --> 00:42:38.100
Right.

00:42:38.100 --> 00:42:38.360
Yeah.

00:42:42.980 --> 00:42:45.520
How did we create this?

00:42:45.840 --> 00:42:46.440
I want to understand.

00:42:47.580 --> 00:42:50.220
How did we get into that Nobleprog case?

00:42:50.460 --> 00:42:52.140
How was it coming in there?

00:42:53.760 --> 00:42:54.140
Okay.

00:42:55.040 --> 00:42:55.400
Okay.

00:42:56.080 --> 00:42:58.180
Then why are they getting intimate issues?

00:42:59.200 --> 00:42:59.880
What reason?

00:43:00.280 --> 00:43:00.640
I'm not sure.

00:43:00.840 --> 00:43:01.720
I'm able to do it online.

00:43:02.020 --> 00:43:04.160
So the reason I'm using CreateInMine

00:43:04.160 --> 00:43:06.800
and mine is working, for them it's not working.

00:43:06.800 --> 00:43:09.220
The same lab they're doing, actually.

00:43:09.400 --> 00:43:10.540
Mine doesn't like...

00:43:10.540 --> 00:43:12.500
I use my AWS account.

00:43:13.360 --> 00:43:13.440
Yes.

00:43:13.800 --> 00:43:16.780
Mine and then your virtual machines or your local machines?

00:43:17.000 --> 00:43:19.860
I created in my AWS account and mine.

00:43:19.860 --> 00:43:22.820
In that, I created the Kubernetes cluster.

00:43:23.400 --> 00:43:24.880
In that, I'm not having issue.

00:43:25.420 --> 00:43:28.900
But if I am using your environment in which I deployed,

00:43:29.760 --> 00:43:33.040
it is having some problem, sometimes the ports.

00:43:33.220 --> 00:43:33.740
Hope you understand.

00:43:33.740 --> 00:43:34.180
I have no idea.

00:43:36.720 --> 00:43:38.660
Are you trying to...

00:43:38.660 --> 00:43:39.000
No EKS.

00:43:39.860 --> 00:43:41.120
EKS on those nodes, right?

00:43:41.240 --> 00:43:41.800
No EKS.

00:43:41.920 --> 00:43:42.800
Normal Kubernetes.

00:43:43.120 --> 00:43:43.380
Kubernetes.

00:43:44.460 --> 00:43:44.960
Is it okay?

00:43:45.340 --> 00:43:46.360
Is it okay that you can join?

00:43:46.660 --> 00:43:47.420
Someone can join the session.

00:43:48.720 --> 00:43:50.640
I think they're asking me.

00:43:50.960 --> 00:43:51.260
One second.

00:43:51.520 --> 00:43:51.760
Okay, team.

00:43:51.980 --> 00:43:53.160
I'm with the backend team.

00:43:53.460 --> 00:43:53.840
Yes.

00:43:54.040 --> 00:43:54.860
Is it working, everyone?

00:43:54.980 --> 00:43:55.300
Yes, team.

00:43:55.500 --> 00:43:55.940
We have a question.

00:43:56.060 --> 00:43:56.420
Okay.

00:43:56.420 --> 00:43:56.600
Okay.

00:43:56.600 --> 00:43:57.640
I'm checking the backend team.

00:43:57.700 --> 00:43:58.820
Why are you getting error messages?

00:43:59.380 --> 00:44:00.360
Is it working on mine?

00:44:01.360 --> 00:44:01.800
Others?

00:44:02.100 --> 00:44:02.640
Are we good?

00:44:03.140 --> 00:44:03.580
Okay.

00:44:03.800 --> 00:44:05.720
Are you still getting error messages, team?

00:44:06.180 --> 00:44:07.240
Are you still getting error messages?

00:44:08.420 --> 00:44:09.760
When you are in all the namespaces?

00:44:11.100 --> 00:44:11.540
Okay.

00:44:11.560 --> 00:44:12.400
Let me see error now.

00:44:12.480 --> 00:44:13.360
Can you do...

00:44:14.680 --> 00:44:15.440
Do a clear.

00:44:17.100 --> 00:44:17.820
Get ports.

00:44:18.020 --> 00:44:18.560
I don't know why.

00:44:18.740 --> 00:44:19.360
This hyphen...

00:44:20.980 --> 00:44:21.140
Why?

00:44:21.920 --> 00:44:22.920
They're doing the restart.

00:44:23.100 --> 00:44:23.320
Okay.

00:44:23.380 --> 00:44:24.000
Get ports.

00:44:24.780 --> 00:44:25.700
Do a kubectl.

00:44:25.700 --> 00:44:26.740
Get ports.

00:44:27.540 --> 00:44:28.420
Hyphen, hyphen.

00:44:28.860 --> 00:44:29.080
All.

00:44:31.420 --> 00:44:32.300
Hyphen namespaces.

00:44:33.480 --> 00:44:33.920
Yes.

00:44:34.720 --> 00:44:35.540
Hyphen space.

00:44:35.700 --> 00:44:37.700
Hyphen, hyphen.

00:44:37.700 --> 00:44:38.480
Oh, oh.

00:44:38.560 --> 00:44:38.720
Why?

00:44:38.980 --> 00:44:40.420
Hyphen, hyphen.

00:44:41.480 --> 00:44:42.000
Not there.

00:44:42.600 --> 00:44:43.260
Namespace also.

00:44:43.440 --> 00:44:44.620
Hyphen, hyphen.

00:44:44.840 --> 00:44:45.160
Enter.

00:44:45.400 --> 00:44:45.600
Okay.

00:44:45.620 --> 00:44:46.000
One second.

00:44:46.180 --> 00:44:46.800
Let me give a command.

00:44:46.940 --> 00:44:47.060
Okay.

00:44:47.080 --> 00:44:47.260
Sorry.

00:44:47.400 --> 00:44:48.100
Hyphen, hyphen.

00:44:48.320 --> 00:44:50.140
All hyphen namespaces.

00:44:50.520 --> 00:44:51.080
Is that better?

00:44:51.980 --> 00:44:52.200
Enter.

00:44:52.480 --> 00:44:52.700
Okay.

00:44:52.880 --> 00:44:53.100
Fine.

00:44:53.300 --> 00:44:53.740
One second.

00:44:53.860 --> 00:44:54.340
Getting a call.

00:44:55.040 --> 00:44:55.420
Yes, sir.

00:44:57.220 --> 00:44:58.700
Can you give me a zoom call?

00:44:59.080 --> 00:45:00.680
I'll ask the backup to join me.

00:45:02.100 --> 00:45:03.500
What do you want me to do?

00:45:04.720 --> 00:45:05.040
Sorry?

00:45:05.960 --> 00:45:07.040
You want the link or zoom link?

00:45:07.200 --> 00:45:07.940
You want the link?

00:45:08.660 --> 00:45:09.440
Yeah, zoom link.

00:45:09.600 --> 00:45:10.480
Tell the zoom link.

00:45:10.920 --> 00:45:13.080
So that he can connect with you over the call.

00:45:13.320 --> 00:45:17.180
Because you don't have access to your mobile phone.

00:45:17.820 --> 00:45:18.980
He's not from mobile phone.

00:45:19.460 --> 00:45:20.160
He's fighting.

00:45:20.960 --> 00:45:21.160
Okay.

00:45:21.760 --> 00:45:21.960
Okay.

00:45:22.200 --> 00:45:23.700
I think I'll manage now.

00:45:23.800 --> 00:45:25.200
I think the break or something we can do.

00:45:25.260 --> 00:45:25.400
Is it okay?

00:45:25.400 --> 00:45:26.400
Let me know the...

00:45:28.420 --> 00:45:28.820
Okay.

00:45:33.180 --> 00:45:34.720
Then I think I'll ask for a break now.

00:45:36.220 --> 00:45:36.500
Team.

00:45:38.220 --> 00:45:39.300
I'll ask for right now.

00:45:39.520 --> 00:45:39.820
Is it okay?

00:45:41.000 --> 00:45:41.920
Right now is available.

00:45:42.080 --> 00:45:42.320
Fine.

00:45:42.400 --> 00:45:43.960
I'll ask for a break and then I'll talk with you.

00:45:44.260 --> 00:45:44.640
Yeah.

00:45:45.920 --> 00:45:46.320
Okay.

00:45:46.320 --> 00:45:47.080
Thank you.

00:45:48.240 --> 00:45:48.640
Team.

00:45:49.060 --> 00:45:52.380
So we want to do see what's happening in the backend.

00:45:53.320 --> 00:45:55.180
Is it okay that you can take a 10 minute break now?

00:45:55.940 --> 00:45:56.220
Yes.

00:45:56.660 --> 00:45:58.400
I want to check the word by the reason getting this.

00:45:58.420 --> 00:45:59.860
So that we need 10 minutes.

00:46:00.620 --> 00:46:00.900
Yeah.

00:46:01.240 --> 00:46:03.080
So break for 10, 15 minutes.

00:46:03.120 --> 00:46:05.100
So I think we take 15 minutes break now.

00:46:06.700 --> 00:46:07.620
And we'll be back.

00:46:07.880 --> 00:46:08.000
Yeah.

00:46:08.060 --> 00:46:08.500
Thank you.

00:46:08.600 --> 00:46:10.260
Sir, I've given a link to you.

00:46:10.480 --> 00:46:11.800
You can join the Google Meet.

00:46:11.900 --> 00:46:12.280
Hi, sir.

00:46:12.340 --> 00:46:12.840
Can you hear me?

00:46:12.980 --> 00:46:13.260
Hi, Raghav.

00:46:13.460 --> 00:46:14.000
Hi, Raghav.

00:46:14.280 --> 00:46:14.820
Hi, Raghav.

00:46:14.880 --> 00:46:15.260
Can you hear me?

00:46:15.380 --> 00:46:15.820
Now who's speaking?

00:46:16.020 --> 00:46:16.300
Hello.

00:46:16.580 --> 00:46:16.600
Hello.

00:46:16.600 --> 00:46:17.180
Hi, Raghav.

00:46:17.280 --> 00:46:17.700
Can you hear me?

00:46:17.940 --> 00:46:18.140
Yeah, yeah.

00:46:18.140 --> 00:46:19.060
See the admission screen.

00:46:20.560 --> 00:46:24.720
So, Raghav, when they log in here, so they are getting this error.

00:46:24.940 --> 00:46:25.060
See here.

00:46:26.120 --> 00:46:27.420
This is coming common.

00:46:28.660 --> 00:46:29.740
See if I.

00:46:30.240 --> 00:46:30.640
Yes, yes.

00:46:30.700 --> 00:46:31.280
This is mine.

00:46:31.320 --> 00:46:32.040
Also it happened.

00:46:32.540 --> 00:46:34.060
So now I have to go.

00:46:35.860 --> 00:46:35.900
Oh.

00:46:36.820 --> 00:46:38.440
Get pods called.

00:46:40.120 --> 00:46:43.460
And this has some intermediately.

00:46:43.820 --> 00:46:44.280
See here.

00:46:44.400 --> 00:46:44.740
Okay.

00:46:45.060 --> 00:46:47.780
So now if I do describe the pod.

00:46:47.780 --> 00:46:51.120
And this is my.

00:46:51.420 --> 00:46:52.120
Pod name.

00:46:56.120 --> 00:46:57.380
And I'm just mentioning.

00:46:58.620 --> 00:46:59.260
Man.

00:47:00.000 --> 00:47:00.640
System.

00:47:05.880 --> 00:47:06.780
So you're getting this error.

00:47:08.000 --> 00:47:08.980
Magnet network.

00:47:09.420 --> 00:47:09.560
Hi, sir.

00:47:10.880 --> 00:47:11.380
Okay.

00:47:11.580 --> 00:47:17.120
So I'm getting something because of this fail container Q proxy for backup restarting.

00:47:17.780 --> 00:47:22.140
So I also went ahead and any any additional for anything is there.

00:47:22.160 --> 00:47:23.560
I'm trying to read it.

00:47:24.560 --> 00:47:27.300
And it's happening only on a few of them.

00:47:28.160 --> 00:47:28.700
Not an honor.

00:47:28.840 --> 00:47:30.800
At least all of them is fine.

00:47:30.980 --> 00:47:31.360
See here.

00:47:31.360 --> 00:47:32.700
It works for this.

00:47:33.000 --> 00:47:33.520
Work for this.

00:47:33.800 --> 00:47:34.320
But not this.

00:47:34.340 --> 00:47:35.240
Syntimately happens.

00:47:36.000 --> 00:47:36.980
So what I've done is.

00:47:37.200 --> 00:47:38.620
The reason I've installed.

00:47:38.980 --> 00:47:41.340
On my own EC2 instance.

00:47:42.020 --> 00:47:43.860
And for the past one I'm using this.

00:47:45.340 --> 00:47:45.720
Yes.

00:47:51.760 --> 00:47:54.320
So for past whenever I'm using my account.

00:47:54.440 --> 00:47:55.220
I'm not having this.

00:47:55.480 --> 00:47:57.100
And this people are getting intermediately.

00:47:57.100 --> 00:47:58.940
So even when I'm telling them to.

00:47:58.940 --> 00:48:00.020
Delete the files.

00:48:00.160 --> 00:48:00.960
I just storage.

00:48:01.740 --> 00:48:05.320
I'm not able to do the storage because I don't have access to the storage on beans.

00:48:05.380 --> 00:48:06.060
I'm not sure.

00:48:06.620 --> 00:48:07.240
It is.

00:48:07.900 --> 00:48:08.160
Yeah.

00:48:08.200 --> 00:48:09.460
I feel that.

00:48:10.160 --> 00:48:10.520
Or.

00:48:10.560 --> 00:48:11.620
It's something else.

00:48:12.420 --> 00:48:13.040
That we are taking.

00:48:13.140 --> 00:48:15.500
Because it is not happening in mine.

00:48:16.140 --> 00:48:16.320
Here.

00:48:17.080 --> 00:48:17.760
It is happening in my account.

00:48:17.760 --> 00:48:18.500
Intermediately.

00:48:19.000 --> 00:48:19.700
And for example.

00:48:19.720 --> 00:48:20.880
I also had some files.

00:48:20.880 --> 00:48:21.460
I wasn't.

00:48:21.460 --> 00:48:22.620
Remove any other files.

00:48:22.680 --> 00:48:24.360
We are just having many basic files.

00:48:25.400 --> 00:48:26.840
So can we increase storage now.

00:48:27.080 --> 00:48:27.980
In the back end.

00:48:28.080 --> 00:48:29.280
I feel that could be a problem.

00:48:29.880 --> 00:48:31.320
Because other things is good.

00:48:31.560 --> 00:48:33.180
So I feel sorry for the problem.

00:48:33.820 --> 00:48:34.940
So I want to increase the storage.

00:48:35.100 --> 00:48:37.160
Or anything else you feel could be a problem.

00:48:37.280 --> 00:48:38.180
I mean based on settings.

00:48:38.340 --> 00:48:39.380
What setting we have done.

00:48:40.560 --> 00:48:41.180
You know what.

00:48:41.720 --> 00:48:42.740
Apart from that.

00:48:43.200 --> 00:48:44.580
Anything else settings or something.

00:48:44.760 --> 00:48:45.180
I'm not sure.

00:48:45.180 --> 00:48:46.200
Any policies or something.

00:48:46.200 --> 00:48:47.360
Or anything.

00:48:48.420 --> 00:48:49.900
I'm not aware of it.

00:48:50.140 --> 00:48:51.760
Have you mentioned all traffic.

00:48:52.040 --> 00:48:53.600
Or you all mentioned all TCP ports.

00:48:54.460 --> 00:48:54.700
Okay.

00:48:54.900 --> 00:48:55.160
Fine.

00:48:56.800 --> 00:48:57.640
Why is that.

00:48:57.800 --> 00:48:59.540
See now we have used two rules correct.

00:48:59.620 --> 00:49:00.180
Why are we having.

00:49:00.400 --> 00:49:01.800
We can remove the previous one.

00:49:01.940 --> 00:49:02.600
So for example.

00:49:02.740 --> 00:49:03.580
If you go to security.

00:49:04.360 --> 00:49:05.200
You added it.

00:49:05.560 --> 00:49:07.240
So why are we having the minimum port.

00:49:08.340 --> 00:49:10.120
Don't think this is going to have a conflict sometimes.

00:49:10.620 --> 00:49:12.200
Because you have small and then more.

00:49:12.620 --> 00:49:12.680
Understand.

00:49:12.880 --> 00:49:13.140
But to be.

00:49:14.240 --> 00:49:14.600
Understand.

00:49:14.660 --> 00:49:15.460
But why do you want to do.

00:49:15.460 --> 00:49:15.880
No teacher.

00:49:16.060 --> 00:49:17.040
That's what I'm having a problem.

00:49:18.420 --> 00:49:19.300
So my question is.

00:49:19.380 --> 00:49:20.360
Can you remove this one.

00:49:20.400 --> 00:49:20.720
Because.

00:49:21.000 --> 00:49:22.300
There is some conflict between.

00:49:22.580 --> 00:49:23.600
More and less.

00:49:24.420 --> 00:49:25.440
I'm just thinking of thoughts.

00:49:26.820 --> 00:49:28.000
Can you remove this.

00:49:29.440 --> 00:49:30.720
This one rule is all traffic.

00:49:30.960 --> 00:49:32.120
Why are you having both of them.

00:49:32.840 --> 00:49:33.360
This is one.

00:49:33.880 --> 00:49:34.600
Another one is.

00:49:34.640 --> 00:49:36.640
I want to increase the storage on all the nodes.

00:49:37.520 --> 00:49:38.040
In the back end.

00:49:38.160 --> 00:49:38.840
Can you do these two.

00:49:39.020 --> 00:49:40.160
The security group is removed.

00:49:41.420 --> 00:49:42.520
I mean the ports are modified.

00:49:42.780 --> 00:49:43.600
The ports have been modified.

00:49:43.740 --> 00:49:44.780
Okay let me just check.

00:49:44.780 --> 00:49:45.720
Teacher.

00:49:47.360 --> 00:49:48.720
And then.

00:49:49.080 --> 00:49:49.620
Click this.

00:49:49.980 --> 00:49:50.240
Yeah.

00:49:50.240 --> 00:49:50.400
Yeah.

00:49:50.400 --> 00:49:51.200
It's coming in.

00:49:51.320 --> 00:49:51.700
Okay.

00:49:52.620 --> 00:49:52.860
Okay.

00:49:52.900 --> 00:49:55.020
Can you increase the storage.

00:49:55.180 --> 00:49:56.020
For example.

00:49:56.280 --> 00:49:56.960
My.

00:49:56.960 --> 00:49:58.000
Worker one.

00:49:58.960 --> 00:50:00.260
Is having a problem.

00:50:00.720 --> 00:50:01.400
So for example.

00:50:01.480 --> 00:50:03.160
This is coming on my.

00:50:04.240 --> 00:50:04.920
Worker.

00:50:05.060 --> 00:50:05.480
One.

00:50:05.640 --> 00:50:06.300
Which is.

00:50:06.320 --> 00:50:07.000
This IP.

00:50:08.340 --> 00:50:09.160
So can you.

00:50:09.360 --> 00:50:10.000
Go ahead.

00:50:10.380 --> 00:50:10.600
And.

00:50:10.720 --> 00:50:11.780
This one.

00:50:13.500 --> 00:50:14.120
Which is.

00:50:16.140 --> 00:50:17.180
This one.

00:50:17.740 --> 00:50:18.340
Increase storage.

00:50:19.480 --> 00:50:19.980
Of this.

00:50:20.960 --> 00:50:22.000
To at least 10 or something.

00:50:22.140 --> 00:50:22.700
At least 2 GB.

00:50:22.900 --> 00:50:23.920
And let's see what happens.

00:50:25.620 --> 00:50:27.080
At least 18.

00:50:28.240 --> 00:50:29.280
138.99.

00:50:29.680 --> 00:50:30.400
The public IP.

00:50:32.160 --> 00:50:33.100
For instance I.

00:50:33.220 --> 00:50:35.360
I am asking because my concern is here.

00:50:35.480 --> 00:50:36.980
Since all of them.

00:50:37.560 --> 00:50:38.560
Are coming in.

00:50:38.560 --> 00:50:39.620
Somewhere in.

00:50:39.720 --> 00:50:42.200
See at the end of the day they all are coming in one screen.

00:50:42.780 --> 00:50:44.100
So is it because of.

00:50:44.100 --> 00:50:45.900
Any network issues.

00:50:46.020 --> 00:50:47.440
In which you are seeing everything.

00:50:48.180 --> 00:50:49.880
Any bandwidth issues or something.

00:50:49.960 --> 00:50:50.620
I'm not sure.

00:50:50.820 --> 00:50:51.700
Just give me a thought.

00:50:53.080 --> 00:50:53.900
It is working.

00:50:55.460 --> 00:50:55.740
With.

00:50:57.440 --> 00:50:59.420
On my putty.

00:50:59.740 --> 00:51:00.040
Perfect.

00:51:00.960 --> 00:51:02.420
And this lab is still edited.

00:51:03.920 --> 00:51:06.220
And this is happening randomly on some machines.

00:51:06.460 --> 00:51:07.600
Not on very specific machines.

00:51:08.660 --> 00:51:09.620
See for example.

00:51:10.180 --> 00:51:11.700
You can see for these.

00:51:11.780 --> 00:51:12.240
It's working.

00:51:12.920 --> 00:51:15.000
But some doesn't work.

00:51:16.240 --> 00:51:17.920
So that's the reason not to understand.

00:51:18.540 --> 00:51:20.320
Why is it one for some.

00:51:21.660 --> 00:51:23.020
Randomly it happens like this.

00:51:23.220 --> 00:51:24.800
What I've done now.

00:51:26.860 --> 00:51:27.920
If you increase the volume.

00:51:28.240 --> 00:51:28.820
Existing volume.

00:51:29.060 --> 00:51:29.960
You need to reboot them.

00:51:30.200 --> 00:51:30.840
You need to reboot.

00:51:31.380 --> 00:51:33.440
Can't directly modify the existing one.

00:51:33.880 --> 00:51:35.660
I think it must allow you.

00:51:36.760 --> 00:51:38.320
Tim are you back?

00:51:39.480 --> 00:51:39.760
Charles.

00:51:40.900 --> 00:51:41.240
Nathas.

00:51:41.240 --> 00:51:42.120
Okay.

00:51:42.120 --> 00:51:42.640
Okay.

00:51:42.700 --> 00:51:43.800
We're just seeing the issue.

00:51:44.140 --> 00:51:44.620
This for.

00:51:45.040 --> 00:51:46.440
To be unsafe aside.

00:51:46.800 --> 00:51:47.020
Okay.

00:51:47.180 --> 00:51:47.580
Rack of.

00:51:47.720 --> 00:51:49.040
Can we start working in.

00:51:49.720 --> 00:51:50.900
Back in.

00:51:51.060 --> 00:51:52.500
Anything else you want me to.

00:51:55.060 --> 00:51:55.460
Okay.

00:51:55.600 --> 00:51:55.960
Thank you.

00:51:56.880 --> 00:51:57.260
Yeah.

00:51:59.100 --> 00:51:59.260
Yes.

00:52:00.500 --> 00:52:01.720
Now let's continue.

00:52:03.580 --> 00:52:04.980
So now we're going to.

00:52:05.340 --> 00:52:06.400
I'm going to do a demo now.

00:52:06.640 --> 00:52:07.380
For the yaml file.

00:52:09.880 --> 00:52:10.560
So before.

00:52:10.560 --> 00:52:12.600
I'm going to use this mind.

00:52:13.460 --> 00:52:14.580
I'm going to say delete.

00:52:15.000 --> 00:52:15.440
The problem.

00:52:16.740 --> 00:52:16.980
I can.

00:52:18.140 --> 00:52:19.740
Let me do this.

00:52:19.920 --> 00:52:21.280
You want to observe.

00:52:21.660 --> 00:52:22.560
And then I'll give you.

00:52:23.120 --> 00:52:24.400
Time for every step.

00:52:24.620 --> 00:52:24.920
Yeah.

00:52:25.520 --> 00:52:26.720
So in the down now.

00:52:26.980 --> 00:52:27.300
First.

00:52:27.940 --> 00:52:29.940
I'm going to write in the yaml file.

00:52:30.220 --> 00:52:30.660
With this.

00:52:31.820 --> 00:52:33.480
I copied this yaml file.

00:52:33.580 --> 00:52:34.460
Going to the master.

00:52:35.080 --> 00:52:37.220
I say deploy dot yaml.

00:52:37.280 --> 00:52:38.380
And observing here.

00:52:38.380 --> 00:52:40.360
The API version is different because.

00:52:40.360 --> 00:52:42.280
Your deployment is a different location.

00:52:42.600 --> 00:52:42.940
The path.

00:52:44.080 --> 00:52:45.160
And to find this.

00:52:45.320 --> 00:52:46.540
We are using these commands.

00:52:47.160 --> 00:52:48.900
So this command will let you know.

00:52:48.900 --> 00:52:50.180
Which is your.

00:52:50.380 --> 00:52:51.640
API version to be used.

00:52:52.500 --> 00:52:54.140
And it will give apps.

00:52:54.400 --> 00:52:55.100
For such even.

00:52:56.120 --> 00:52:57.680
And this session is for your deployment.

00:52:59.620 --> 00:53:00.060
This session.

00:53:00.240 --> 00:53:01.060
For replica set.

00:53:02.320 --> 00:53:03.360
This is your pod.

00:53:04.700 --> 00:53:05.920
And this is your continuous session.

00:53:06.840 --> 00:53:08.580
So once I apply this.

00:53:08.720 --> 00:53:09.920
We create a deployment with this name.

00:53:11.460 --> 00:53:11.920
That will create.

00:53:12.600 --> 00:53:13.540
A replica set.

00:53:14.560 --> 00:53:15.800
And that replica set in turn.

00:53:15.820 --> 00:53:16.840
Creates the pods.

00:53:17.760 --> 00:53:18.340
Three pods.

00:53:18.860 --> 00:53:20.780
With each one having one container.

00:53:21.340 --> 00:53:22.760
So now I'm going to apply this.

00:53:24.240 --> 00:53:25.120
So now I say.

00:53:29.040 --> 00:53:30.360
Deploy dot yaml.

00:53:30.500 --> 00:53:32.220
And now I say deploy.

00:53:32.820 --> 00:53:34.180
Hyphen o and y.

00:53:34.180 --> 00:53:35.980
Deployment got created with three copies.

00:53:36.220 --> 00:53:36.920
Of this image.

00:53:38.820 --> 00:53:40.240
And I say.

00:53:40.680 --> 00:53:41.420
To replica set.

00:53:42.920 --> 00:53:44.180
It got three copies.

00:53:45.360 --> 00:53:46.440
And this got created.

00:53:46.440 --> 00:53:47.540
From this deployment.

00:53:47.680 --> 00:53:48.560
You see this name.

00:53:50.460 --> 00:53:52.520
And I say get pods.

00:53:52.700 --> 00:53:53.700
Hyphen o and y.

00:53:54.440 --> 00:53:55.840
You see three pods got created.

00:53:56.000 --> 00:53:57.020
From this replica set.

00:53:57.200 --> 00:53:58.280
How do you identify it?

00:53:58.280 --> 00:53:59.860
It has the replica set name.

00:54:00.040 --> 00:54:00.760
And the unique name.

00:54:00.840 --> 00:54:01.660
Are we good till here?

00:54:01.920 --> 00:54:04.460
Charles, CK, Green, others.

00:54:04.600 --> 00:54:07.120
Could you please do this step everyone?

00:54:07.940 --> 00:54:08.900
On the same lines.

00:54:09.580 --> 00:54:11.860
Do just create the yaml file.

00:54:12.180 --> 00:54:13.160
Apply it.

00:54:13.580 --> 00:54:15.260
And observe the outputs.

00:54:15.520 --> 00:54:17.140
Do till F command.

00:54:17.320 --> 00:54:19.560
And both these pods get created on different nodes.

00:54:19.660 --> 00:54:22.040
You see they are getting load balance.

00:54:22.320 --> 00:54:22.920
Waiting for it.

00:54:26.680 --> 00:54:27.720
Let me see.

00:54:31.960 --> 00:54:33.660
Creating on worker one.

00:54:34.040 --> 00:54:34.360
Yeah.

00:54:34.940 --> 00:54:35.840
So you can see it here.

00:54:36.000 --> 00:54:37.460
Refresh the command now.

00:54:37.940 --> 00:54:38.040
G.

00:54:38.600 --> 00:54:40.200
Again do get pods have no y.

00:54:41.160 --> 00:54:41.400
Okay.

00:54:41.900 --> 00:54:42.860
Let's see.

00:54:45.180 --> 00:54:46.840
Didn't create it.

00:54:48.440 --> 00:54:49.700
Now let's go next step.

00:54:50.700 --> 00:54:51.740
So now let's play around.

00:54:52.400 --> 00:54:52.900
Okay.

00:54:52.900 --> 00:54:54.380
Let's try to delete the pod.

00:54:54.980 --> 00:54:56.080
And see what happens.

00:54:56.960 --> 00:54:58.040
So delete the pod.

00:54:58.060 --> 00:54:59.800
Any pod got created among these.

00:54:59.920 --> 00:55:01.940
This is running. Copy the pod.

00:55:03.080 --> 00:55:04.140
And paste it.

00:55:05.580 --> 00:55:07.740
Now since we talked about replica set.

00:55:07.940 --> 00:55:09.620
It will understand that's the problem.

00:55:09.860 --> 00:55:11.160
It will immediately create the pod.

00:55:11.240 --> 00:55:12.420
Let's see what happens now.

00:55:12.540 --> 00:55:14.240
So I do get pods have no y.

00:55:14.900 --> 00:55:17.260
And you see the pod came up automatically.

00:55:17.620 --> 00:55:17.820
Yeah.

00:55:17.980 --> 00:55:20.720
You observe that the pod will come automatically once gets deleted.

00:55:21.020 --> 00:55:23.980
So this is what is replica set.

00:55:24.580 --> 00:55:26.740
So replica set will ensure that the numbers

00:55:26.740 --> 00:55:27.500
would match.

00:55:28.560 --> 00:55:30.140
Now let's just try to scale up.

00:55:30.220 --> 00:55:32.420
So now we will say

00:55:32.420 --> 00:55:33.560
scale up your pod.

00:55:33.900 --> 00:55:36.320
So let's do

00:55:36.320 --> 00:55:38.780
kubectl scale.

00:55:40.840 --> 00:55:41.360
Next command.

00:55:41.680 --> 00:55:43.300
So when you go to documentation.

00:55:44.100 --> 00:55:45.780
It's almost scaling up now.

00:55:46.220 --> 00:55:47.860
Run this command and observe

00:55:47.860 --> 00:55:49.620
does it scale up.

00:55:49.780 --> 00:55:51.540
It will immediately update.

00:55:51.700 --> 00:55:52.940
So you can do a deploy.

00:55:53.780 --> 00:55:54.840
You see five copies.

00:55:56.420 --> 00:55:56.900
Deployment.

00:55:57.180 --> 00:55:59.300
It will update the replica set to five copies.

00:55:59.500 --> 00:56:01.920
It will also create two more pods to make it

00:56:01.920 --> 00:56:02.960
five. Are we good everyone?

00:56:03.260 --> 00:56:04.660
You see five is coming in.

00:56:05.300 --> 00:56:07.120
Yeah. There is some issues going on.

00:56:07.120 --> 00:56:09.520
But I think that is coming up.

00:56:09.740 --> 00:56:10.760
Taking some time.

00:56:11.600 --> 00:56:13.180
Now you can make it to one.

00:56:13.560 --> 00:56:15.100
So observe to get created more.

00:56:15.100 --> 00:56:16.920
And again you can try to make it less.

00:56:16.960 --> 00:56:18.120
So we see it increases.

00:56:18.820 --> 00:56:20.620
Now you can use the same command.

00:56:21.320 --> 00:56:22.600
And make it less.

00:56:22.760 --> 00:56:24.560
So make it two for example. Delete.

00:56:26.360 --> 00:56:27.280
And you can see

00:56:27.280 --> 00:56:28.560
that you have only two pods.

00:56:29.960 --> 00:56:31.380
So this is how we can either

00:56:31.380 --> 00:56:32.900
scale up the workload is more.

00:56:33.440 --> 00:56:35.160
Or you can scale down when

00:56:35.160 --> 00:56:36.820
the workload is less. Are we good?

00:56:38.720 --> 00:56:39.540
Everyone now let me

00:56:39.540 --> 00:56:40.900
talk the next one. Don't delete it.

00:56:40.920 --> 00:56:43.360
Let us proceed to the next step. I'll explain the next.

00:56:43.360 --> 00:56:45.260
Now next topic is

00:56:45.260 --> 00:56:46.300
rolling update.

00:56:47.620 --> 00:56:49.400
Now right now what we

00:56:49.400 --> 00:56:50.680
created your pod

00:56:51.500 --> 00:56:53.220
version is engine

00:56:53.220 --> 00:56:55.360
x 1.14.2

00:56:56.900 --> 00:56:57.680
which is

00:56:57.680 --> 00:56:59.180
part of a replica set.

00:57:00.320 --> 00:57:01.500
And that replica set

00:57:01.500 --> 00:57:03.120
in turn your scheduler got created.

00:57:03.480 --> 00:57:05.500
All these are 1.14.2

00:57:05.500 --> 00:57:07.460
Now you want to update the application

00:57:07.460 --> 00:57:09.260
to a new version. To

00:57:09.260 --> 00:57:10.860
1.16.1

00:57:11.920 --> 00:57:13.460
So you do

00:57:13.460 --> 00:57:14.400
need to do update.

00:57:14.940 --> 00:57:17.000
When do an update it creates

00:57:17.000 --> 00:57:18.320
a new replica set

00:57:18.860 --> 00:57:20.860
for 1.16.1

00:57:21.440 --> 00:57:23.320
and it will create

00:57:23.320 --> 00:57:24.800
new things.

00:57:25.080 --> 00:57:26.920
First we create

00:57:26.920 --> 00:57:28.960
equivalent one of this.

00:57:30.060 --> 00:57:30.740
We create this

00:57:30.740 --> 00:57:32.660
and then this will get terminated.

00:57:34.100 --> 00:57:35.720
Then we create equivalent one of this

00:57:35.720 --> 00:57:37.020
on the other side.

00:57:37.960 --> 00:57:38.860
Then this will get terminated.

00:57:39.080 --> 00:57:41.900
And then we create one

00:57:41.900 --> 00:57:43.380
of this

00:57:43.380 --> 00:57:45.080
and then this will get terminated.

00:57:46.720 --> 00:57:47.620
This is called as a

00:57:47.620 --> 00:57:48.400
rolling update.

00:57:49.140 --> 00:57:51.260
So rolling update you can mention

00:57:51.260 --> 00:57:52.940
how many you want to update

00:57:52.940 --> 00:57:55.080
at a single point of time.

00:57:55.700 --> 00:57:57.240
It will always ensure that

00:57:57.240 --> 00:57:59.100
the other version comes up first.

00:57:59.680 --> 00:58:00.580
All settle down

00:58:00.580 --> 00:58:03.020
and then the existing pod

00:58:03.020 --> 00:58:03.900
would go down.

00:58:04.860 --> 00:58:07.200
And this is the default strategy in your

00:58:07.200 --> 00:58:07.440
pod.

00:58:08.800 --> 00:58:11.180
Let's do this in your documentation

00:58:11.180 --> 00:58:11.860
to lab.

00:58:13.200 --> 00:58:14.080
This is the command

00:58:14.820 --> 00:58:16.800
to update to a new version

00:58:16.800 --> 00:58:18.440
and you want to record it.

00:58:18.480 --> 00:58:20.380
So that tomorrow you can go ahead and see

00:58:20.380 --> 00:58:21.540
what exactly updated.

00:58:22.940 --> 00:58:24.580
Then we can read the rollout history.

00:58:26.200 --> 00:58:27.200
And you can roll back

00:58:27.200 --> 00:58:28.300
to previous version

00:58:28.940 --> 00:58:30.840
or the specific version using

00:58:30.840 --> 00:58:33.080
these rollout history commands.

00:58:34.720 --> 00:58:35.380
So now let's

00:58:35.380 --> 00:58:37.500
go ahead and set the image.

00:58:37.880 --> 00:58:39.240
So now when I do now

00:58:39.240 --> 00:58:41.380
getRs or getPlot

00:58:42.480 --> 00:58:42.960
while

00:58:43.680 --> 00:58:45.580
you see that it gets updated

00:58:45.580 --> 00:58:46.500
so fast.

00:58:47.660 --> 00:58:49.380
And if I do getRs

00:58:49.960 --> 00:58:50.980
hyphen on white

00:58:51.820 --> 00:58:53.720
there are two replica sets.

00:58:54.560 --> 00:58:55.660
So all of them

00:58:55.660 --> 00:58:57.120
became zero in here

00:58:57.120 --> 00:58:59.560
and this has got two. And all the pods

00:58:59.560 --> 00:59:01.480
have got updated to the latest version.

00:59:01.580 --> 00:59:03.420
You can go describe and see the pod.

00:59:03.420 --> 00:59:04.900
So you can go describe of the pod

00:59:05.420 --> 00:59:07.660
and see what is the version of the pod

00:59:07.660 --> 00:59:09.320
image. So you see that they updated

00:59:09.320 --> 00:59:11.400
to 1.16.1. Let me know if

00:59:11.400 --> 00:59:13.160
you have any questions. And you can see the rollout history.

00:59:13.280 --> 00:59:14.560
Let's see now.

00:59:16.040 --> 00:59:16.300
Okay.

00:59:17.320 --> 00:59:19.400
So can you do getPods hyphen o white

00:59:20.000 --> 00:59:20.440
g?

00:59:22.760 --> 00:59:23.640
kubectl getPods

00:59:23.640 --> 00:59:25.180
space hyphen o

00:59:25.180 --> 00:59:25.920
and white.

00:59:28.300 --> 00:59:29.360
I think we need to understand

00:59:29.360 --> 00:59:30.380
what we did now.

00:59:31.720 --> 00:59:32.240
Yes?

00:59:32.420 --> 00:59:33.440
No? Are we good?

00:59:34.280 --> 00:59:36.720
After describe command, describe pod

00:59:37.320 --> 00:59:38.300
describe pod

00:59:38.300 --> 00:59:40.500
and the pod name. And in that go ahead

00:59:40.500 --> 00:59:41.780
and see which version is it.

00:59:41.920 --> 00:59:43.920
It's using 1.16.1.

00:59:43.940 --> 00:59:45.920
You can see under the container session.

00:59:47.500 --> 00:59:48.520
It means the pod is

00:59:48.520 --> 00:59:50.300
using right now it is using this

00:59:50.300 --> 00:59:51.660
image version. Did I answer your question?

00:59:52.420 --> 00:59:52.700
Yeah.

00:59:53.680 --> 00:59:56.140
So now let's consider that something

00:59:56.140 --> 00:59:58.480
happened. You want to revert back.

00:59:58.480 --> 01:00:00.840
You can revert back to previous

01:00:00.840 --> 01:00:02.780
just the previous version by

01:00:02.780 --> 01:00:03.840
just mentioning

01:00:04.480 --> 01:00:06.420
this command undo deployment.

01:00:07.420 --> 01:00:08.940
So now undo deployment

01:00:08.940 --> 01:00:10.520
and this command.

01:00:11.660 --> 01:00:12.620
It will roll back just to

01:00:12.620 --> 01:00:13.780
previous version automatically.

01:00:14.580 --> 01:00:16.420
And you can see all the pods

01:00:16.420 --> 01:00:18.520
will move to the old replica set. So now run

01:00:18.520 --> 01:00:20.440
this command. And when you now do

01:00:20.440 --> 01:00:22.480
get all or you can do one by one.

01:00:24.580 --> 01:00:26.480
You see it rolled back to 1.14.2.

01:00:28.000 --> 01:00:28.840
And do

01:00:28.840 --> 01:00:30.700
get rs-o

01:00:30.700 --> 01:00:32.620
wide. You see that

01:00:32.620 --> 01:00:34.620
all of them has moved to the previous ones.

01:00:34.780 --> 01:00:36.880
And again you can get pods

01:00:37.640 --> 01:00:38.800
if you know one by

01:00:38.800 --> 01:00:40.500
do a describe of any of the pods

01:00:40.500 --> 01:00:41.980
square any of the pod.

01:00:44.540 --> 01:00:46.420
And you would see the version

01:00:46.420 --> 01:00:48.560
would be 1.14.2

01:00:49.140 --> 01:00:50.400
for the

01:00:50.400 --> 01:00:51.100
image.

01:00:53.320 --> 01:00:53.440
Yeah.

01:00:53.440 --> 01:00:55.940
You can also roll out a specific

01:00:55.940 --> 01:00:57.760
version by using a revision

01:00:57.760 --> 01:00:59.640
number also. All the revision numbers

01:00:59.640 --> 01:01:01.520
you can again update to different

01:01:01.520 --> 01:01:03.920
versions. Try to update different versions for example.

01:01:04.960 --> 01:01:05.700
You can use one

01:01:05.700 --> 01:01:07.540
more if you want to play around. So we use

01:01:07.540 --> 01:01:09.660
1.14.2 something correct.

01:01:10.300 --> 01:01:11.800
So try to update

01:01:11.800 --> 01:01:13.680
it to this one and

01:01:13.680 --> 01:01:15.560
try to update to latest one. So I'm going

01:01:15.560 --> 01:01:17.840
to just find player app. So I'm going to do latest

01:01:18.980 --> 01:01:19.880
and record.

01:01:20.360 --> 01:01:21.640
Yeah. So now

01:01:21.640 --> 01:01:23.960
how many replica sets must be there now?

01:01:24.220 --> 01:01:25.780
How many replica sets now?

01:01:26.380 --> 01:01:26.920
Two or three?

01:01:28.680 --> 01:01:29.860
Run this command now. You will have

01:01:29.860 --> 01:01:31.820
three replica sets or two replica sets now?

01:01:34.380 --> 01:01:34.860
Others

01:01:37.300 --> 01:01:37.780
CK

01:01:37.780 --> 01:01:39.840
Jean. You must have three replica sets. Do you

01:01:39.840 --> 01:01:41.960
agree? Because we have three image versions.

01:01:43.920 --> 01:01:45.300
Are we good? I understand it.

01:01:45.520 --> 01:01:47.760
So every image version would be part

01:01:47.760 --> 01:01:49.440
of one replica set. Clear?

01:01:49.440 --> 01:01:51.300
And all of the latest one now. It is

01:01:51.300 --> 01:01:52.420
according to latest version.

01:01:54.280 --> 01:01:55.400
Now let's see the rollout history.

01:01:55.600 --> 01:01:57.640
Same thing. Just play around. So now see the rollout

01:01:57.640 --> 01:01:59.760
history. And see

01:01:59.760 --> 01:02:01.740
the history of your

01:02:01.740 --> 01:02:03.400
the J command run again.

01:02:04.520 --> 01:02:05.600
And see a rollout history.

01:02:05.800 --> 01:02:07.520
And you see it is update

01:02:07.520 --> 01:02:09.400
to 4. Now let's again revert

01:02:09.400 --> 01:02:11.480
back to revision number 2.

01:02:12.620 --> 01:02:13.780
So you want to move to revision

01:02:13.780 --> 01:02:14.420
number 2.

01:02:15.700 --> 01:02:17.500
So you can go ahead

01:02:17.500 --> 01:02:19.820
and run this command

01:02:19.820 --> 01:02:21.400
for revision number 2.

01:02:21.440 --> 01:02:23.260
Any revision number you can put.

01:02:23.300 --> 01:02:25.280
For numbers you see there.

01:02:25.960 --> 01:02:27.500
So revision number 2 is my

01:02:29.080 --> 01:02:31.760
1.16.1. You see number 2.

01:02:31.780 --> 01:02:33.900
I press enter and you would see

01:02:33.900 --> 01:02:35.680
deployment wide.

01:02:36.220 --> 01:02:36.900
Move to

01:02:36.900 --> 01:02:38.520
1.16.1.

01:02:39.820 --> 01:02:41.100
And also

01:02:41.100 --> 01:02:42.560
your replica set

01:02:42.560 --> 01:02:44.440
would be under

01:02:44.440 --> 01:02:46.440
the 1.16.1.

01:02:48.720 --> 01:02:49.140
And your

01:02:49.140 --> 01:02:50.660
pods also. You can also do like this.

01:02:50.860 --> 01:02:52.200
And also do a describe pod.

01:02:52.320 --> 01:02:53.820
Get pods for example.

01:02:55.100 --> 01:02:56.400
And do a describe the pod.

01:02:56.680 --> 01:02:57.780
Describe pod.

01:02:58.880 --> 01:03:00.220
Give any pod name.

01:03:01.780 --> 01:03:02.800
And you can use a grip symbol

01:03:02.800 --> 01:03:03.920
if you want. Grip.

01:03:04.080 --> 01:03:06.820
The image. Now use the syntax.

01:03:07.040 --> 01:03:08.740
It will give you only the line which has

01:03:08.740 --> 01:03:10.700
the word image. Replace the

01:03:10.700 --> 01:03:12.640
pod name with your pod name.

01:03:12.640 --> 01:03:14.880
It's a shortcut. Instead of me

01:03:14.880 --> 01:03:16.980
going into the pod and seeing the details

01:03:16.980 --> 01:03:18.820
I can see the details by

01:03:18.820 --> 01:03:20.380
gripping it. Very good. The content

01:03:20.380 --> 01:03:22.760
player for everyone. Charles

01:03:24.320 --> 01:03:24.960
CK.

01:03:25.360 --> 01:03:27.040
June. So in enterprises

01:03:27.040 --> 01:03:28.780
you normally

01:03:28.780 --> 01:03:30.960
create pods using a deployment.

01:03:31.340 --> 01:03:32.660
Because it helps

01:03:32.660 --> 01:03:34.800
to create multiple pods at once.

01:03:35.300 --> 01:03:36.560
You can scale up.

01:03:36.840 --> 01:03:38.560
Scale down. You can do

01:03:38.560 --> 01:03:40.920
updates. You can record it.

01:03:40.920 --> 01:03:43.120
And you also have other methods

01:03:43.120 --> 01:03:44.920
to update which we are going to talk about now.

01:03:46.460 --> 01:03:46.980
Now

01:03:46.980 --> 01:03:49.260
a question for you all. If you delete

01:03:49.260 --> 01:03:50.820
replica set what would happen?

01:03:50.880 --> 01:03:53.000
If you delete replica set what would happen?

01:03:53.800 --> 01:03:54.900
Please try to think.

01:03:55.080 --> 01:03:56.580
Would it come up automatically or no?

01:03:56.860 --> 01:03:58.480
It is because the statement is the deployment.

01:04:00.020 --> 01:04:00.980
So it

01:04:00.980 --> 01:04:02.980
may come up. So if you want

01:04:02.980 --> 01:04:05.120
to delete everything then you delete the deployment.

01:04:05.700 --> 01:04:06.920
Now let's go ahead and delete

01:04:06.920 --> 01:04:09.220
the deployment. So you can delete

01:04:09.220 --> 01:04:11.340
multiple ones. You can say delete

01:04:11.340 --> 01:04:12.680
deploy nickname.

01:04:13.640 --> 01:04:15.100
And you can say pod.

01:04:21.460 --> 01:04:22.740
Like this.

01:04:24.240 --> 01:04:25.000
So get

01:04:25.720 --> 01:04:26.360
delete

01:04:27.360 --> 01:04:28.980
deploy hyphen hyphen pod.

01:04:29.020 --> 01:04:29.920
All will get deleted.

01:04:32.020 --> 01:04:33.320
Now when you go back

01:04:33.320 --> 01:04:35.380
now and you see you will not have

01:04:35.380 --> 01:04:36.660
pods. Your deployment

01:04:36.660 --> 01:04:39.000
is gone. You don't have any

01:04:39.000 --> 01:04:39.820
replica set.

01:04:41.600 --> 01:04:42.800
You also see that

01:04:42.800 --> 01:04:44.800
there are no pods of that

01:04:44.800 --> 01:04:46.760
particular names. So let's

01:04:46.760 --> 01:04:48.720
go to the next topic. The continuation of

01:04:48.720 --> 01:04:50.640
deployment. Let me I think

01:04:50.640 --> 01:04:52.960
so do you work on updates?

01:04:54.260 --> 01:04:54.840
Do you work on

01:04:54.840 --> 01:04:56.440
updates in your

01:04:56.440 --> 01:04:58.860
work? Do you update applications

01:04:58.860 --> 01:05:00.740
like this? Is it part of your

01:05:00.740 --> 01:05:02.560
workloads? The future? Yeah. Yeah. Yeah.

01:05:02.640 --> 01:05:04.560
So tomorrow you would be updating application

01:05:04.560 --> 01:05:06.500
different version. All these you are supposed to do.

01:05:06.580 --> 01:05:08.080
Is that your work? Okay. Okay fine.

01:05:08.820 --> 01:05:10.540
Yes let me share one more document.

01:05:10.740 --> 01:05:12.640
Give me a minute. I am going to share a document

01:05:12.640 --> 01:05:14.200
to you which will be useful for you.

01:05:14.500 --> 01:05:16.560
For deployment. Please download this document.

01:05:17.540 --> 01:05:18.680
It will only take some time.

01:05:20.020 --> 01:05:20.600
So this

01:05:20.600 --> 01:05:22.520
document talks about different

01:05:22.520 --> 01:05:24.560
methods to update or deploy

01:05:25.700 --> 01:05:26.340
in your

01:05:26.340 --> 01:05:28.700
Kubernetes. Now we are talking

01:05:28.700 --> 01:05:30.620
about recreate

01:05:31.160 --> 01:05:32.640
ramp, blue

01:05:32.640 --> 01:05:34.140
green, canary,

01:05:34.440 --> 01:05:35.840
A-B testing and shadow.

01:05:37.100 --> 01:05:38.400
These are different methods.

01:05:39.300 --> 01:05:40.260
Now how does it work?

01:05:40.560 --> 01:05:42.740
We observed right now that one deployment

01:05:42.740 --> 01:05:44.640
can have single replica set

01:05:44.640 --> 01:05:46.140
or multiple replica sets.

01:05:47.760 --> 01:05:48.640
We will talk about services

01:05:48.640 --> 01:05:49.500
the next topic.

01:05:51.100 --> 01:05:52.880
We will talk about these in the next topic.

01:05:53.040 --> 01:05:54.820
So what is recreate? So recreate

01:05:54.820 --> 01:05:55.620
is wherein

01:05:56.280 --> 01:05:58.360
the user traffic. The user

01:05:58.360 --> 01:06:00.980
is going to load balancer and then reaches your application.

01:06:01.580 --> 01:06:02.800
These are the pod.

01:06:04.420 --> 01:06:05.400
So these are

01:06:05.400 --> 01:06:07.020
you have three v1 pod

01:06:07.020 --> 01:06:07.600
versions.

01:06:09.580 --> 01:06:10.840
Now if you want to update

01:06:10.840 --> 01:06:12.800
you delete the v1 and then

01:06:12.800 --> 01:06:14.380
create the v2 version.

01:06:15.800 --> 01:06:17.400
So there is a down time involved.

01:06:19.200 --> 01:06:19.560
So this

01:06:19.560 --> 01:06:21.280
method is used when

01:06:21.280 --> 01:06:23.000
you are doing a testing of a

01:06:23.000 --> 01:06:25.200
workloads. Whether the down time

01:06:25.200 --> 01:06:27.000
doesn't matter. It is quite easy to do it.

01:06:27.100 --> 01:06:29.220
You just need to delete the older ones, create a new

01:06:29.220 --> 01:06:32.060
yaml file of a new version and then create it.

01:06:32.400 --> 01:06:33.620
But there is a huge

01:06:33.620 --> 01:06:34.340
impact

01:06:34.940 --> 01:06:37.600
in case if you are looking for live customers.

01:06:38.060 --> 01:06:39.180
Down time will be there. The one which we

01:06:39.180 --> 01:06:41.060
used right now is also called a ramp

01:06:41.060 --> 01:06:43.220
or incremental or rolling

01:06:43.220 --> 01:06:43.820
update.

01:06:44.860 --> 01:06:46.720
So in this what happens right now we have

01:06:46.720 --> 01:06:49.120
v1 like 1.14.2

01:06:49.120 --> 01:06:51.060
which we use. When you say

01:06:51.060 --> 01:06:53.100
update 1.16.1

01:06:53.100 --> 01:06:53.840
what happens?

01:06:55.200 --> 01:06:57.280
You define the percentage. In default

01:06:57.280 --> 01:06:59.300
if you don't mention percentage it is normally

01:07:00.860 --> 01:07:01.320
33%.

01:07:01.320 --> 01:07:03.440
33% of 3 is 1. So you will update

01:07:03.440 --> 01:07:05.040
one of them first, the higher version

01:07:05.040 --> 01:07:07.240
and then the existing one will go down.

01:07:08.300 --> 01:07:09.700
You create equivalent one of this

01:07:09.700 --> 01:07:11.280
you see here. The user

01:07:11.280 --> 01:07:13.180
is still connected to this version not

01:07:13.180 --> 01:07:15.540
this. Once this is ready

01:07:15.540 --> 01:07:17.300
then this will go away.

01:07:18.880 --> 01:07:19.320
And then

01:07:19.320 --> 01:07:21.520
this gets created. This is called

01:07:21.520 --> 01:07:22.500
as a rolling update.

01:07:23.800 --> 01:07:25.260
And you can modify

01:07:25.260 --> 01:07:27.700
how many you want to update at once

01:07:27.700 --> 01:07:29.320
by using in a kind

01:07:29.320 --> 01:07:29.920
deployment.

01:07:30.900 --> 01:07:32.120
You can write in this parameters.

01:07:34.420 --> 01:07:35.420
So for

01:07:35.420 --> 01:07:37.520
example if you observe your

01:07:37.520 --> 01:07:39.720
deployment. So if I

01:07:39.720 --> 01:07:40.860
say apply

01:07:40.860 --> 01:07:43.200
the yaml file which you created

01:07:43.200 --> 01:07:45.400
and if I say

01:07:45.400 --> 01:07:46.900
get deploy

01:07:48.360 --> 01:07:49.340
yaml file.

01:07:50.500 --> 01:07:51.380
You see this

01:07:51.380 --> 01:07:53.220
it gets in the yaml file information.

01:07:53.220 --> 01:07:56.120
And in this yaml file right now

01:07:56.120 --> 01:07:57.220
you can see the rolling update

01:07:58.200 --> 01:07:59.120
it is

01:07:59.120 --> 01:08:01.220
at 25%.

01:08:01.820 --> 01:08:03.520
So approximately after 3 it is taking

01:08:03.520 --> 01:08:04.740
in 1 right now.

01:08:05.140 --> 01:08:06.860
So you can modify these values.

01:08:07.080 --> 01:08:08.960
And to modify values you can also use this method.

01:08:09.040 --> 01:08:10.520
You can also say edit.

01:08:11.960 --> 01:08:13.480
You can also either open the yaml

01:08:13.480 --> 01:08:15.040
file or you can say edit.

01:08:15.800 --> 01:08:17.020
Deployment, deployment name,

01:08:17.180 --> 01:08:19.240
have no yaml. And you can modify

01:08:19.240 --> 01:08:20.000
the configurations.

01:08:20.760 --> 01:08:22.620
So for example I want to

01:08:22.620 --> 01:08:24.440
3 hat, I want to create more copies.

01:08:25.620 --> 01:08:26.160
I can also

01:08:26.160 --> 01:08:28.180
modify like this. Either open the yaml

01:08:28.180 --> 01:08:30.260
file or you can

01:08:30.260 --> 01:08:32.300
modify like this and then

01:08:32.300 --> 01:08:33.920
save like this.

01:08:35.180 --> 01:08:36.320
So like this we can make

01:08:36.320 --> 01:08:37.220
in the modifications.

01:08:38.480 --> 01:08:40.160
This is the rolling update.

01:08:40.620 --> 01:08:42.140
So you can define how many you want to

01:08:42.140 --> 01:08:43.740
unavailable that is 2.

01:08:44.140 --> 01:08:45.600
Like this we can mention numbers.

01:08:46.040 --> 01:08:46.380
Are we good?

01:08:46.380 --> 01:08:47.380
This is the yaml update.

01:08:47.580 --> 01:08:48.940
This is good.

01:08:50.700 --> 01:08:52.540
Sometimes you might have

01:08:53.440 --> 01:08:54.540
lose control

01:08:54.540 --> 01:08:55.460
but very rare.

01:08:56.220 --> 01:08:58.280
This is very good to use. So this is something

01:08:58.280 --> 01:09:00.820
recommended by kubernetes.

01:09:01.280 --> 01:09:02.720
Blue green is a strategy

01:09:02.720 --> 01:09:04.460
in which one is live

01:09:04.460 --> 01:09:06.040
other one is not live.

01:09:06.760 --> 01:09:08.580
So example this is green

01:09:08.580 --> 01:09:10.560
this is live. It means customer workloads

01:09:10.560 --> 01:09:12.640
is going to this v1.

01:09:12.720 --> 01:09:14.460
Now assume that

01:09:14.460 --> 01:09:16.540
the v1 version is getting expired.

01:09:17.220 --> 01:09:18.480
You have to move the application

01:09:18.480 --> 01:09:19.760
to a new version.

01:09:20.020 --> 01:09:22.520
So internally you create a v2

01:09:22.520 --> 01:09:23.760
version of application

01:09:24.460 --> 01:09:26.460
and then switch the user to v2.

01:09:29.180 --> 01:09:30.520
The v1 version is still there

01:09:30.520 --> 01:09:32.600
in the backend. It is not terminated.

01:09:33.700 --> 01:09:34.800
So something happens to v2

01:09:34.800 --> 01:09:36.680
you can switch back to v1.

01:09:37.500 --> 01:09:38.940
So blue green is something like this

01:09:38.940 --> 01:09:39.840
and you have 2 environments.

01:09:40.900 --> 01:09:42.480
In this the challenge is

01:09:42.480 --> 01:09:44.820
you need to deploy 2 of them.

01:09:44.880 --> 01:09:46.740
It means it is costly.

01:09:47.980 --> 01:09:48.900
And other one is

01:09:48.900 --> 01:09:50.660
you are not doing a live testing.

01:09:50.880 --> 01:09:52.600
You are assuming that it will work for

01:09:52.600 --> 01:09:53.600
v2 for the customer.

01:09:54.640 --> 01:09:55.840
You are not doing a live testing.

01:09:57.180 --> 01:09:58.360
You might get some errors.

01:09:58.980 --> 01:10:00.580
So if you are very confident then you can do

01:10:00.580 --> 01:10:02.440
but you are taking a risk. So in case

01:10:02.440 --> 01:10:03.560
you don't want to take a risk

01:10:03.560 --> 01:10:06.320
you can do a canary in which

01:10:06.320 --> 01:10:08.100
you would send traffic

01:10:08.100 --> 01:10:10.200
like 10% to the other side.

01:10:10.200 --> 01:10:14.080
Then increase from 10% to 20%

01:10:14.080 --> 01:10:15.500
like 30%.

01:10:15.500 --> 01:10:16.700
You keep on doing it.

01:10:17.560 --> 01:10:18.380
And for doing this

01:10:18.380 --> 01:10:19.500
traffic management,

01:10:20.000 --> 01:10:21.920
Kubernetes does not have the capability.

01:10:22.980 --> 01:10:24.360
So you have to use

01:10:24.360 --> 01:10:25.160
service mesh.

01:10:25.700 --> 01:10:28.260
Like we have linkerti, we have istio

01:10:29.680 --> 01:10:31.180
third party tools

01:10:31.180 --> 01:10:33.060
which you have to install it

01:10:33.060 --> 01:10:34.340
and you have to define the

01:10:34.340 --> 01:10:35.860
routes or the rules.

01:10:37.220 --> 01:10:38.420
So example like this.

01:10:38.420 --> 01:10:41.120
So you have to use tools like istio

01:10:41.120 --> 01:10:42.720
install it, configure

01:10:42.720 --> 01:10:45.000
with kubernetes and then you can mention

01:10:45.000 --> 01:10:46.820
that for version 1, 90%

01:10:46.820 --> 01:10:48.800
traffic. For version

01:10:48.800 --> 01:10:50.360
2, 10% traffic.

01:10:51.040 --> 01:10:52.580
We have to do something like this.

01:10:53.560 --> 01:10:54.620
This is good but

01:10:54.620 --> 01:10:56.300
this is complex here.

01:10:57.220 --> 01:10:58.940
A-B testing is also

01:10:58.940 --> 01:11:00.220
very important.

01:11:00.740 --> 01:11:02.680
So A-B testing is an example. If you

01:11:02.680 --> 01:11:04.540
access your Amazon consort from

01:11:04.540 --> 01:11:06.300
a mobile you see a different screen.

01:11:07.060 --> 01:11:08.880
If you see it from your laptop

01:11:08.880 --> 01:11:09.900
you see a different screen.

01:11:10.840 --> 01:11:12.400
So testing has to be done with Amazon

01:11:12.400 --> 01:11:14.480
to ensure that users are able to

01:11:14.480 --> 01:11:16.740
see the options properly on their

01:11:16.740 --> 01:11:17.740
different devices.

01:11:18.780 --> 01:11:20.200
While the user is logging from US

01:11:20.200 --> 01:11:22.300
you might want to see a different page

01:11:22.300 --> 01:11:24.180
in the login page. Something like that.

01:11:24.860 --> 01:11:26.360
So based on user preferences,

01:11:26.600 --> 01:11:28.620
user location, you want to do some testing.

01:11:29.240 --> 01:11:30.600
That is called A-B testing.

01:11:31.560 --> 01:11:32.740
So this is for one version.

01:11:32.960 --> 01:11:34.200
This is B-2 version.

01:11:34.200 --> 01:11:36.580
The last one which we can use is shadow testing.

01:11:37.660 --> 01:11:38.180
But in the user

01:11:38.180 --> 01:11:40.180
traffic also goes to the other

01:11:40.180 --> 01:11:42.380
version. But the user will still

01:11:42.380 --> 01:11:43.640
see the old screen.

01:11:45.020 --> 01:11:46.400
So internally the

01:11:46.400 --> 01:11:48.420
backend theme you would observe

01:11:48.420 --> 01:11:50.580
is the traffic going properly to the B-2 version.

01:11:51.520 --> 01:11:52.180
And then

01:11:52.180 --> 01:11:54.540
you can switch the user to B-2 version.

01:11:55.540 --> 01:11:56.360
So live traffic is

01:11:56.360 --> 01:11:57.060
going to the backend.

01:11:58.380 --> 01:12:00.480
Shadow, mirrored and dark we talk about.

01:12:01.820 --> 01:12:03.500
So these are different methods

01:12:03.500 --> 01:12:05.320
using which you can update applications

01:12:05.320 --> 01:12:06.560
in Kubernetes.

01:12:07.780 --> 01:12:08.660
So when you go for

01:12:08.660 --> 01:12:09.940
if you are looking for zero downtime,

01:12:10.440 --> 01:12:12.700
these are good. If you are talking about real traffic testing,

01:12:13.060 --> 01:12:13.940
these are good.

01:12:15.300 --> 01:12:16.280
If there are use cases

01:12:16.280 --> 01:12:18.600
very specific users, then A-B testing

01:12:18.600 --> 01:12:20.700
talking about. Cloud cost,

01:12:20.740 --> 01:12:22.740
this is more because we are talking about two environments.

01:12:23.480 --> 01:12:24.620
This is more because we are having

01:12:24.620 --> 01:12:25.660
two environments again.

01:12:27.000 --> 01:12:29.040
Rollback duration, impact,

01:12:29.040 --> 01:12:29.760
complexity.

01:12:30.040 --> 01:12:31.900
Are we clear?

01:12:34.060 --> 01:12:34.620
Any questions?

01:12:34.840 --> 01:12:35.980
Yes, no. Are we good team?

01:12:36.180 --> 01:12:39.360
If you have any questions you can ask me.

01:12:40.660 --> 01:12:40.860
Okay.

01:12:41.460 --> 01:12:42.940
So now in the

01:12:42.940 --> 01:12:43.320
labs

01:12:44.640 --> 01:12:46.560
we have seen this.

01:12:46.740 --> 01:12:48.640
This is an example of rolling update.

01:12:48.700 --> 01:12:51.040
So if you have

01:12:51.040 --> 01:12:52.860
you first create one version.

01:12:54.320 --> 01:12:54.940
You create

01:12:54.940 --> 01:12:56.000
one version.

01:12:56.840 --> 01:12:58.000
This is version one.

01:12:58.040 --> 01:13:00.020
Then you want to update to new version.

01:13:00.280 --> 01:13:01.700
The same image for example.

01:13:02.660 --> 01:13:03.660
Right now we have

01:13:03.660 --> 01:13:05.420
what you can do, you can either

01:13:06.180 --> 01:13:07.600
use edit method.

01:13:07.740 --> 01:13:09.040
The doctor will choose edit.

01:13:10.200 --> 01:13:11.340
The deployment name.

01:13:11.760 --> 01:13:14.000
Or open the YAML file and then apply it.

01:13:14.880 --> 01:13:15.660
With the new version.

01:13:16.060 --> 01:13:18.060
So modify the version and apply

01:13:18.060 --> 01:13:18.640
or edit.

01:13:19.420 --> 01:13:20.480
And see what happens.

01:13:21.480 --> 01:13:23.460
Going to play around with this, second one.

01:13:24.200 --> 01:13:25.460
The second lab yourself.

01:13:27.500 --> 01:13:27.600
Please.

01:13:27.800 --> 01:13:29.460
Lab two. Lab two please.

01:13:30.180 --> 01:13:31.500
Please find in your application

01:13:31.500 --> 01:13:33.360
lifecycle management which is module

01:13:33.360 --> 01:13:35.540
three in a kubernetes with lab two.

01:13:35.640 --> 01:13:37.020
Good. You are doing good.

01:13:38.020 --> 01:13:39.820
First version. Yes.

01:13:41.120 --> 01:13:42.120
Now try to modify.

01:13:42.780 --> 01:13:44.460
Instead of one make it two.

01:13:44.780 --> 01:13:45.460
In search mode.

01:13:46.280 --> 01:13:47.380
Press I.

01:13:48.740 --> 01:13:50.100
Press I and then

01:13:50.100 --> 01:13:51.620
instead of one make it two there.

01:13:51.620 --> 01:13:53.620
Yes. Escape colon.

01:13:55.520 --> 01:13:56.080
Save.

01:13:56.360 --> 01:13:57.440
Escape colon WQS.

01:13:57.560 --> 01:13:58.640
Now it will update automatically.

01:13:58.900 --> 01:14:01.680
Just do get deploy hyphen o byte.

01:14:02.700 --> 01:14:03.360
But apply.

01:14:04.040 --> 01:14:05.840
Apply. Apply.

01:14:06.160 --> 01:14:07.760
kubectl apply needs.

01:14:09.640 --> 01:14:11.400
Now you can check the version of deployment.

01:14:11.580 --> 01:14:13.120
You see it has gone to two version.

01:14:14.040 --> 01:14:15.320
But you can do the other method.

01:14:16.140 --> 01:14:17.240
Do edit method now.

01:14:18.240 --> 01:14:19.700
Instead of get.

01:14:20.580 --> 01:14:22.120
Do edit deploy.

01:14:22.360 --> 01:14:23.000
Do other method now.

01:14:24.260 --> 01:14:25.100
kubectl edit.

01:14:25.200 --> 01:14:27.100
I tell you kubectl edit.

01:14:27.160 --> 01:14:28.940
Yes. EDIIT.

01:14:30.860 --> 01:14:31.080
Yes.

01:14:31.220 --> 01:14:34.360
Yes. Deploy.

01:14:34.820 --> 01:14:35.340
Deploy.

01:14:36.060 --> 01:14:37.300
And give the name of the deployment.

01:14:37.560 --> 01:14:39.720
Hello hyphen dep.

01:14:40.440 --> 01:14:41.120
Enter. What happens.

01:14:41.400 --> 01:14:42.420
Blank. Yeah.

01:14:42.720 --> 01:14:44.500
So now in this now. Go down.

01:14:44.880 --> 01:14:46.420
And modify again to three.

01:14:46.420 --> 01:14:48.420
For example. Make it a three version.

01:14:49.320 --> 01:14:50.720
Now the line. The image line.

01:14:51.080 --> 01:14:52.560
Yes. Insert mode. Make it a three.

01:14:52.720 --> 01:14:54.620
Just escape colon save.

01:14:55.260 --> 01:14:56.880
Save it.

01:14:57.420 --> 01:14:59.340
Colon. Escape colon WQS.

01:14:59.540 --> 01:15:01.640
Let me check.

01:15:02.180 --> 01:15:03.920
Can you come out of this file again?

01:15:04.360 --> 01:15:06.240
Don't save it. Escape colon Q.

01:15:06.340 --> 01:15:08.200
Don't do W.

01:15:08.800 --> 01:15:10.040
Escape colon Q.

01:15:10.120 --> 01:15:12.140
And exclamation. Again go inside.

01:15:12.460 --> 01:15:13.200
Don't see. Yeah.

01:15:13.200 --> 01:15:13.600
OK.

01:15:14.620 --> 01:15:16.640
I think. Can you go down.

01:15:16.820 --> 01:15:19.260
I tell you how to do it. So I tell you what to do.

01:15:19.480 --> 01:15:21.000
Go down. Go to insert mode.

01:15:21.740 --> 01:15:23.940
Go to the line where the image line is there.

01:15:24.200 --> 01:15:24.960
Go up.

01:15:25.900 --> 01:15:26.420
Yes. Delete.

01:15:26.740 --> 01:15:28.720
One delete. One delete. Press the delete once.

01:15:28.820 --> 01:15:29.640
One second. That's fine.

01:15:30.240 --> 01:15:31.560
Go to starting the line.

01:15:33.880 --> 01:15:34.980
You made some errors.

01:15:35.660 --> 01:15:37.560
Yeah. Click on delete button once.

01:15:39.360 --> 01:15:41.080
Delete. Yes. Once more.

01:15:41.080 --> 01:15:43.180
Yes. Yes. Now save it.

01:15:43.220 --> 01:15:44.880
Escape colon WQS.

01:15:45.620 --> 01:15:47.040
Now. You could go ahead and see

01:15:47.040 --> 01:15:48.880
it will update to version 3. Do again

01:15:48.880 --> 01:15:50.680
deploying. No. Just see the version now.

01:15:50.860 --> 01:15:52.980
See that. So we can

01:15:52.980 --> 01:15:54.880
yeah. So we can either use

01:15:54.880 --> 01:15:57.280
the existing YAML. We can open it.

01:15:57.600 --> 01:15:59.060
Or we can do edit.

01:15:59.740 --> 01:16:01.140
Or get in a new YAML file

01:16:01.140 --> 01:16:02.960
and modify. These are different methods

01:16:02.960 --> 01:16:05.120
wherein you can update your configurations.

01:16:05.300 --> 01:16:05.540
Clear?

01:16:07.540 --> 01:16:09.160
Yeah. Yeah. Others

01:16:09.160 --> 01:16:11.480
Are we good? No. No. No.

01:16:11.700 --> 01:16:12.660
Okay. I'll tell you what to do.

01:16:14.300 --> 01:16:15.140
Press I.

01:16:15.440 --> 01:16:17.440
Press I. Insert mode.

01:16:19.100 --> 01:16:19.240
Yeah.

01:16:19.320 --> 01:16:20.240
Now good.

01:16:21.340 --> 01:16:22.260
Now go to that line.

01:16:22.620 --> 01:16:25.280
Go to that line. Use the apparel. Yes. Yeah.

01:16:25.420 --> 01:16:26.860
Colon. Colon.

01:16:27.380 --> 01:16:28.600
No. No. No. Okay. That's fine.

01:16:29.400 --> 01:16:31.120
3. Yeah. Now go to starting

01:16:31.120 --> 01:16:33.140
the line. Go to starting

01:16:33.140 --> 01:16:35.240
the line. Press delete

01:16:35.240 --> 01:16:37.460
once. Still back. Still back.

01:16:37.460 --> 01:16:39.540
Yeah. Delete once. Press delete once.

01:16:39.740 --> 01:16:40.860
Once more.

01:16:42.180 --> 01:16:43.700
Once more. Yes. No. No.

01:16:44.540 --> 01:16:45.260
Use your friend.

01:16:45.700 --> 01:16:47.240
Use the space bar.

01:16:47.440 --> 01:16:49.660
Press space bar once. Yes. Good.

01:16:50.260 --> 01:16:51.460
Escape colon WQ.

01:16:52.720 --> 01:16:53.220
Escape.

01:16:53.220 --> 01:16:55.600
See this file. That's it. Now check the deployment

01:16:55.600 --> 01:16:57.460
version now. Go to get deploy

01:16:57.460 --> 01:16:59.040
hyphen OY. Get deploy

01:16:59.040 --> 01:17:00.980
hyphen OY.

01:17:01.280 --> 01:17:03.620
And you see the version has changed

01:17:03.620 --> 01:17:04.400
too. Clear?

01:17:06.220 --> 01:17:07.100
So different

01:17:07.100 --> 01:17:08.660
methods using which you can update the

01:17:08.660 --> 01:17:09.360
configurations.

01:17:11.360 --> 01:17:12.760
Others. Are we good? Okay. Good. Good.

01:17:13.200 --> 01:17:14.660
Good. So now you're finding it.

01:17:14.900 --> 01:17:16.640
You like your billets now or you like

01:17:16.640 --> 01:17:18.600
containers? Yes. Which one is more interesting?

01:17:19.480 --> 01:17:19.740
Charles?

01:17:20.780 --> 01:17:22.340
Which one is interesting for you?

01:17:22.480 --> 01:17:23.900
Yesterday's topics or today's topics?

01:17:24.720 --> 01:17:26.380
Okay. Okay. Good.

01:17:27.920 --> 01:17:28.540
Okay. Now

01:17:28.540 --> 01:17:29.600
delete the deployment.

01:17:30.500 --> 01:17:32.640
Delete the deployment and see what happens.

01:17:32.640 --> 01:17:34.160
Everything will go. Go and check.

01:17:34.560 --> 01:17:36.420
You will not have any deployment.

01:17:36.880 --> 01:17:39.080
Replica set. Nothing would be there.

01:17:40.340 --> 01:17:40.360
Okay.

01:17:40.360 --> 01:17:41.060
Next topic.

01:17:42.820 --> 01:17:44.380
So what do you mean by health check?

01:17:44.820 --> 01:17:46.700
Have you heard the term health check?

01:17:49.320 --> 01:17:50.120
Or probing?

01:17:50.720 --> 01:17:50.980
Yes, Gene.

01:17:51.320 --> 01:17:52.640
You just told yes.

01:17:52.860 --> 01:17:55.000
I heard you. Yes. Try to answer it.

01:17:55.180 --> 01:17:56.380
You can try your best. Okay.

01:17:56.380 --> 01:17:58.580
Let me start from here. In kubernetes

01:17:58.580 --> 01:18:00.880
which component would do the health check of a

01:18:00.880 --> 01:18:03.360
pod? Who does the health check? Who does the health check

01:18:03.360 --> 01:18:04.880
of your pods? It is your

01:18:05.960 --> 01:18:07.080
cubelet. Clear?

01:18:08.580 --> 01:18:09.200
So cubelet

01:18:09.200 --> 01:18:10.920
does the health check. Let me now

01:18:10.920 --> 01:18:12.400
explain the example.

01:18:13.880 --> 01:18:15.000
Now let's consider

01:18:16.440 --> 01:18:17.560
you had

01:18:17.560 --> 01:18:18.880
this is your worker node

01:18:18.880 --> 01:18:21.140
and you have cubelet in every node.

01:18:21.260 --> 01:18:23.800
And you have the pod

01:18:24.560 --> 01:18:25.660
running inside

01:18:25.660 --> 01:18:26.160
this.

01:18:26.860 --> 01:18:28.600
And the pod one,

01:18:28.600 --> 01:18:30.440
pod two,

01:18:30.780 --> 01:18:31.780
and pod three.

01:18:32.860 --> 01:18:34.660
And this is running your application.

01:18:35.240 --> 01:18:36.940
Okay. So cubelet

01:18:36.940 --> 01:18:38.480
needs to check if

01:18:38.480 --> 01:18:39.780
it is working fine.

01:18:41.300 --> 01:18:42.540
So it has to go ahead

01:18:42.540 --> 01:18:44.340
and look into some important file.

01:18:45.000 --> 01:18:47.180
For example, for a front end

01:18:47.180 --> 01:18:48.600
could be index.html

01:18:49.520 --> 01:18:50.760
is very important file

01:18:50.760 --> 01:18:52.720
because this has the front end contents.

01:18:53.840 --> 01:18:54.560
If this is not

01:18:54.560 --> 01:18:56.840
responding, then there is some problem

01:18:56.840 --> 01:18:58.140
with your application.

01:18:59.060 --> 01:19:00.780
This type of probing what

01:19:00.780 --> 01:19:02.980
cubelet can do is called

01:19:02.980 --> 01:19:04.980
as liveness probes.

01:19:05.080 --> 01:19:06.780
So liveness probe means

01:19:06.780 --> 01:19:09.020
cubelet will check if the

01:19:09.020 --> 01:19:11.060
end point is responding properly.

01:19:11.280 --> 01:19:13.120
Is it coming up very

01:19:13.120 --> 01:19:15.000
soon? Is it slow? Those type of

01:19:15.000 --> 01:19:16.960
checks. And for doing

01:19:16.960 --> 01:19:18.940
this, it does a health check using a pod.

01:19:19.540 --> 01:19:21.060
So it uses a protocol like

01:19:21.060 --> 01:19:21.520
HTTP.

01:19:23.140 --> 01:19:25.080
It uses try to reaches using a port

01:19:25.080 --> 01:19:27.220
number 80. And this is the

01:19:27.220 --> 01:19:27.920
end point.

01:19:28.840 --> 01:19:30.280
So the protocol is HTTP.

01:19:31.540 --> 01:19:32.720
It will go like this.

01:19:32.720 --> 01:19:35.280
It will go to port 80

01:19:35.280 --> 01:19:36.020
for example.

01:19:36.920 --> 01:19:39.140
And under 80 it will try to reach the

01:19:39.140 --> 01:19:41.140
point index.html.

01:19:41.200 --> 01:19:42.040
This is your protocol.

01:19:43.340 --> 01:19:45.140
So you have to mention which port number

01:19:45.820 --> 01:19:47.080
and you have to mention the

01:19:48.580 --> 01:19:49.140
destination

01:19:49.140 --> 01:19:50.760
or end point or

01:19:50.760 --> 01:19:51.640
retort of path.

01:19:51.640 --> 01:19:53.240
It will use multiple names.

01:19:55.120 --> 01:19:55.940
And when must

01:19:55.940 --> 01:19:57.900
it do? So you mention interval

01:19:57.900 --> 01:19:59.540
name like interval 15

01:20:00.100 --> 01:20:01.600
seconds. So it does this

01:20:01.600 --> 01:20:03.240
checks every 15 seconds.

01:20:04.500 --> 01:20:05.760
Whenever it does, how much

01:20:05.760 --> 01:20:07.080
of time you want it to wait.

01:20:07.900 --> 01:20:09.420
That you mention under

01:20:09.420 --> 01:20:12.080
time mode like 5 seconds.

01:20:12.260 --> 01:20:13.720
And how does it know it is healthy?

01:20:13.980 --> 01:20:15.580
So you can say healthy

01:20:15.580 --> 01:20:17.700
threshold. And you can

01:20:17.700 --> 01:20:19.780
say 3. It means that

01:20:19.780 --> 01:20:21.980
if 3 times it is able to reach

01:20:21.980 --> 01:20:23.820
to this continuously

01:20:23.820 --> 01:20:25.780
3 times consecutively it will understand healthy.

01:20:27.000 --> 01:20:28.160
You can also say unhealthy

01:20:28.160 --> 01:20:29.700
threshold like 2 times.

01:20:30.200 --> 01:20:32.200
If this is not able to reach 2 times

01:20:32.200 --> 01:20:34.040
consecutively it will understand it is

01:20:34.040 --> 01:20:34.620
unhealthy.

01:20:36.400 --> 01:20:38.240
And whenever it is unhealthy

01:20:38.240 --> 01:20:40.160
after some time

01:20:40.160 --> 01:20:42.000
it will do a restart of the

01:20:42.000 --> 01:20:43.840
port. Thinking that

01:20:43.840 --> 01:20:45.940
if you restart the port it would

01:20:45.940 --> 01:20:46.660
become good.

01:20:47.400 --> 01:20:49.120
And hence whenever you see

01:20:49.120 --> 01:20:50.680
any restarts in your port

01:20:50.680 --> 01:20:52.700
it means there is some health checks defined

01:20:52.700 --> 01:20:55.040
inside it. So there are any issues

01:20:55.040 --> 01:20:56.760
in general very regularly

01:20:56.760 --> 01:20:58.780
cubelet would do a restart of the port.

01:21:00.140 --> 01:21:01.100
So this type of

01:21:01.100 --> 01:21:02.720
probing we are talking about the liveness probe.

01:21:03.980 --> 01:21:04.880
Now let us consider

01:21:04.880 --> 01:21:06.800
that your application did not

01:21:06.800 --> 01:21:08.900
come up at all. The port did not come.

01:21:10.080 --> 01:21:10.940
Then the liveness

01:21:10.940 --> 01:21:12.680
probe would fail. So you

01:21:12.680 --> 01:21:14.880
can also define one more probing called

01:21:14.880 --> 01:21:15.940
the start up probe.

01:21:16.940 --> 01:21:18.960
The start up probe would

01:21:18.960 --> 01:21:20.860
ensure that

01:21:20.860 --> 01:21:23.040
once your port

01:21:23.040 --> 01:21:24.880
or the application is running

01:21:24.880 --> 01:21:26.980
settle down then your

01:21:26.980 --> 01:21:28.800
liveness probe would get started.

01:21:29.360 --> 01:21:30.760
So first would be a start up probe

01:21:30.760 --> 01:21:32.600
and then a liveness probe.

01:21:34.340 --> 01:21:35.180
We also have

01:21:35.180 --> 01:21:36.500
something called readiness probe.

01:21:37.140 --> 01:21:38.700
The readiness probe means

01:21:38.700 --> 01:21:41.240
is your application

01:21:41.240 --> 01:21:43.060
ready to take new workloads.

01:21:43.820 --> 01:21:45.620
Can it take new workloads?

01:21:46.040 --> 01:21:47.580
Is it okay to run new workloads?

01:21:47.800 --> 01:21:48.860
We can do some checks.

01:21:49.880 --> 01:21:51.060
So we can do liveness probes

01:21:51.920 --> 01:21:53.960
to check in the status of application.

01:21:54.660 --> 01:21:55.320
Start up probe

01:21:55.320 --> 01:21:56.880
to ensure it is started.

01:21:57.540 --> 01:21:59.380
Readiness probe to check if it is

01:21:59.380 --> 01:22:00.560
ready to take in the workloads.

01:22:01.840 --> 01:22:03.220
And we can use different

01:22:03.220 --> 01:22:05.180
protocols for doing this health checks.

01:22:06.580 --> 01:22:07.540
So we are talking

01:22:07.540 --> 01:22:08.940
about oneness.

01:22:09.720 --> 01:22:11.400
We will talk about this basically after this.

01:22:12.020 --> 01:22:13.220
We can use HTTP

01:22:14.180 --> 01:22:15.540
or we can use TCP

01:22:15.540 --> 01:22:17.880
or we can use custom methods.

01:22:18.940 --> 01:22:19.660
And whenever the health

01:22:19.660 --> 01:22:21.360
check failed it says to restart.

01:22:21.520 --> 01:22:23.500
What is liveness? There is some problem.

01:22:23.840 --> 01:22:25.760
The application is getting hanged.

01:22:25.960 --> 01:22:27.660
So for these type of issues you have to

01:22:27.660 --> 01:22:29.280
understand the restart.

01:22:30.240 --> 01:22:31.720
Readiness probe and

01:22:31.720 --> 01:22:33.540
the start up probe are to ensure

01:22:33.540 --> 01:22:35.580
that these are ready or started.

01:22:35.940 --> 01:22:37.500
And we can use different protocols

01:22:37.500 --> 01:22:38.020
for the same.

01:22:38.020 --> 01:22:40.360
Have you got the concept clear?

01:22:40.700 --> 01:22:42.020
Let's do the

01:22:42.540 --> 01:22:43.560
module 4.

01:22:43.900 --> 01:22:44.580
Lab 4.

01:22:46.220 --> 01:22:47.980
Now what is 200?

01:22:49.440 --> 01:22:50.180
What is the code

01:22:50.180 --> 01:22:51.560
200 means?

01:22:51.960 --> 01:22:53.680
Code 200.

01:22:53.940 --> 01:22:55.100
HTTP. What is 200?

01:22:55.960 --> 01:22:57.940
What is 400? 200 means

01:22:57.940 --> 01:22:59.080
success or fail.

01:22:59.520 --> 01:23:02.460
Any code between 200

01:23:05.060 --> 01:23:05.740
and

01:23:05.740 --> 01:23:06.020
399

01:23:06.080 --> 01:23:07.860
it means

01:23:08.860 --> 01:23:09.640
success.

01:23:11.080 --> 01:23:11.140
Clear?

01:23:11.660 --> 01:23:13.900
Any code above 400

01:23:13.900 --> 01:23:16.300
is just normally an error message.

01:23:17.840 --> 01:23:18.700
I am sure you have seen this.

01:23:18.900 --> 01:23:20.060
When you access any website

01:23:20.060 --> 01:23:22.340
sometimes you see 401. Correct?

01:23:23.160 --> 01:23:24.220
We get some error messages.

01:23:25.500 --> 01:23:26.960
So the

01:23:26.960 --> 01:23:28.120
cubelet and

01:23:28.120 --> 01:23:29.960
the pod they communicate using

01:23:29.960 --> 01:23:31.600
these code languages.

01:23:33.340 --> 01:23:34.460
They use the status

01:23:34.460 --> 01:23:36.780
codes in the backend to understand

01:23:36.780 --> 01:23:38.720
whether the health check passed or

01:23:38.720 --> 01:23:39.360
failed.

01:23:40.660 --> 01:23:42.360
So now in this lab now

01:23:42.360 --> 01:23:43.840
we are going to do a HTTP check.

01:23:44.020 --> 01:23:45.700
So we are going to create a pod

01:23:46.460 --> 01:23:48.160
in which you are going to define a correct

01:23:49.180 --> 01:23:49.740
probing.

01:23:49.900 --> 01:23:51.960
And then we observe as a restart.

01:23:53.360 --> 01:23:54.720
Then we will make some error

01:23:54.720 --> 01:23:55.760
wantedly.

01:23:55.760 --> 01:23:58.460
And we will see if the container gets restarted.

01:23:59.320 --> 01:24:00.780
So this is your example.

01:24:01.980 --> 01:24:02.520
Now

01:24:02.520 --> 01:24:03.960
what is this path?

01:24:05.260 --> 01:24:06.120
What is this path?

01:24:07.060 --> 01:24:08.640
Would this linus check pass

01:24:08.640 --> 01:24:09.400
or fail?

01:24:11.180 --> 01:24:12.120
Would this pass or fail?

01:24:13.640 --> 01:24:14.680
Would this health check

01:24:14.680 --> 01:24:15.860
pass or fail?

01:24:16.540 --> 01:24:17.500
What is path root?

01:24:19.120 --> 01:24:20.640
Should every container have a

01:24:20.640 --> 01:24:22.460
root path? Yes?

01:24:22.500 --> 01:24:24.640
No? I am getting it.

01:24:25.260 --> 01:24:26.760
Would every container have a root path or not?

01:24:26.960 --> 01:24:28.620
Please confirm. The next container would have

01:24:28.620 --> 01:24:30.300
a root path. This would run.

01:24:31.240 --> 01:24:32.940
Because it will find the root path.

01:24:33.240 --> 01:24:33.960
All good.

01:24:34.880 --> 01:24:36.540
Now you tell me now would this run?

01:24:36.860 --> 01:24:37.720
The next one.

01:24:39.460 --> 01:24:40.420
Would this

01:24:40.420 --> 01:24:41.460
pass or fail?

01:24:42.080 --> 01:24:44.240
Testing. Does every default

01:24:44.240 --> 01:24:46.300
enginex would have example.txt?

01:24:46.740 --> 01:24:48.500
Do you agree? Would every container of enginex

01:24:48.500 --> 01:24:50.180
would have a path of example.txt?

01:24:52.060 --> 01:24:52.640
No? Correct?

01:24:53.840 --> 01:24:54.860
You will not have the default

01:24:54.860 --> 01:24:56.840
file. So it will not find the file.

01:24:58.020 --> 01:24:58.620
And it will

01:24:58.620 --> 01:25:00.480
restart the container. Are you getting it?

01:25:01.780 --> 01:25:02.620
Let's do the lab now.

01:25:03.880 --> 01:25:05.040
Let's do lab 4.

01:25:05.180 --> 01:25:06.140
So let's go ahead

01:25:06.700 --> 01:25:08.140
and try to create a pod.

01:25:08.900 --> 01:25:10.780
And we see the pod

01:25:10.780 --> 01:25:11.580
status.

01:25:12.740 --> 01:25:14.840
And observe restart column.

01:25:15.480 --> 01:25:16.880
And let's see whether it gets

01:25:16.880 --> 01:25:18.720
restarted the health check pass.

01:25:19.760 --> 01:25:20.680
So let's go ahead and

01:25:20.680 --> 01:25:21.480
do this.

01:25:22.440 --> 01:25:24.360
Do along with me. First one

01:25:24.360 --> 01:25:25.600
create yaml file.

01:25:26.980 --> 01:25:28.120
And then create

01:25:28.120 --> 01:25:29.600
a pod. And run this.

01:25:32.420 --> 01:25:32.740
Good.

01:25:33.780 --> 01:25:35.440
Now do a describe yourself.

01:25:35.880 --> 01:25:37.340
Do a describe of the pod everyone.

01:25:37.620 --> 01:25:39.680
Describe of the pod and check

01:25:39.680 --> 01:25:41.840
where is the health come. It says line

01:25:41.840 --> 01:25:43.720
which will update the health check. Go and check

01:25:43.720 --> 01:25:45.880
that. Go up. You see a line

01:25:45.880 --> 01:25:47.420
which says health check. Let's see.

01:25:47.660 --> 01:25:49.600
I wanted to observe that. In the describe command

01:25:49.600 --> 01:25:51.700
you will have a line with the health check. What does health check

01:25:51.700 --> 01:25:52.840
says? Yes.

01:25:52.840 --> 01:25:55.040
The right one. So after

01:25:55.040 --> 01:25:56.800
how many. I wanted to answer

01:25:56.800 --> 01:25:59.140
after how many times it will do a restart.

01:25:59.340 --> 01:26:01.020
After how many times does it do a restart

01:26:01.020 --> 01:26:03.000
in case the condition fails. Let me explain

01:26:03.000 --> 01:26:04.080
you this now.

01:26:05.780 --> 01:26:06.840
So it's got created now.

01:26:07.820 --> 01:26:08.900
So I'm going to say

01:26:09.840 --> 01:26:10.320
describe

01:26:10.840 --> 01:26:13.440
pod and the pod name.

01:26:13.480 --> 01:26:14.920
And now you see that it got

01:26:14.920 --> 01:26:17.240
created on worker 1.

01:26:17.560 --> 01:26:18.500
And this is health check.

01:26:19.680 --> 01:26:20.840
So now it is going to

01:26:21.060 --> 01:26:23.360
do a restart in case

01:26:23.360 --> 01:26:25.460
it fails after 3 times.

01:26:25.520 --> 01:26:26.420
This is the threshold.

01:26:27.360 --> 01:26:29.180
Success. So even though

01:26:29.180 --> 01:26:31.000
we did not mention these values

01:26:31.000 --> 01:26:32.740
these are default values we

01:26:32.740 --> 01:26:35.540
picked up. Timeout 1 second.

01:26:36.080 --> 01:26:37.200
So every time it does the check

01:26:37.200 --> 01:26:38.460
it will wait for 1 second.

01:26:39.540 --> 01:26:41.560
And every 5 seconds it will do a check.

01:26:42.680 --> 01:26:43.200
And initiate

01:26:43.200 --> 01:26:45.400
delay. First time before it does

01:26:45.400 --> 01:26:47.340
a check it will wait 15 seconds.

01:26:48.440 --> 01:26:49.280
So it is

01:26:49.280 --> 01:26:52.060
all going to reach because you have a root path.

01:26:52.420 --> 01:26:53.220
So now

01:26:53.220 --> 01:26:55.020
let's check what is happening.

01:26:55.280 --> 01:26:57.280
You see. No restarts.

01:27:00.040 --> 01:27:01.760
Now let's check the logs.

01:27:02.740 --> 01:27:03.480
Do kubectl

01:27:03.480 --> 01:27:05.680
logs and give the

01:27:05.680 --> 01:27:07.280
pod name. Type in kubectl

01:27:08.120 --> 01:27:09.600
logs and the pod

01:27:09.600 --> 01:27:11.120
name. Do you get output like this everyone?

01:27:11.360 --> 01:27:12.220
Please do this.

01:27:13.140 --> 01:27:15.460
Yes you are good. You can do this command

01:27:15.460 --> 01:27:17.280
kubectl logs and the pod name.

01:27:18.180 --> 01:27:18.740
kubectl

01:27:18.740 --> 01:27:21.720
no your command is wrong. kubectl logs

01:27:21.720 --> 01:27:24.920
you did not get full name.

01:27:25.040 --> 01:27:25.600
Charles

01:27:27.240 --> 01:27:27.280
logs

01:27:28.800 --> 01:27:29.360
nginx

01:27:29.360 --> 01:27:31.240
hyphen lightness give full name of

01:27:31.240 --> 01:27:32.940
yes. No no no.

01:27:33.280 --> 01:27:35.600
Lightness. No no. K

01:27:35.600 --> 01:27:37.260
just type it I am going to tell you.

01:27:37.680 --> 01:27:39.280
K space logs

01:27:42.100 --> 01:27:42.660
space

01:27:44.040 --> 01:27:44.600
logs

01:27:44.600 --> 01:27:45.540
logs

01:27:48.320 --> 01:27:48.960
ggs

01:27:48.960 --> 01:27:50.580
yes space

01:27:50.580 --> 01:27:51.460
nginx

01:27:52.300 --> 01:27:54.600
just name of it. Just copy and paste.

01:27:57.100 --> 01:27:57.740
nginx

01:27:57.740 --> 01:27:58.600
Charles paste the

01:27:59.120 --> 01:28:00.800
name of your pod.

01:28:00.920 --> 01:28:02.000
What is the pod name?

01:28:03.620 --> 01:28:04.260
nginx

01:28:04.260 --> 01:28:05.560
no I no I

01:28:07.340 --> 01:28:07.980
nginx

01:28:09.560 --> 01:28:10.200
hyphen

01:28:11.000 --> 01:28:11.640
lightness

01:28:13.580 --> 01:28:14.540
no space

01:28:14.540 --> 01:28:15.640
no space

01:28:17.480 --> 01:28:17.960
hyphen

01:28:17.960 --> 01:28:19.160
lightness enter.

01:28:20.780 --> 01:28:21.260
Ok.

01:28:21.680 --> 01:28:23.560
So now do you see the health check

01:28:23.560 --> 01:28:25.220
passing now? What error number are we getting?

01:28:25.380 --> 01:28:27.160
We are getting the messages 200.

01:28:28.300 --> 01:28:29.780
It means the health check

01:28:29.780 --> 01:28:31.700
is running every how many

01:28:31.700 --> 01:28:33.380
seconds? You have to answer this please.

01:28:33.640 --> 01:28:34.580
5 seconds.

01:28:35.500 --> 01:28:36.760
You see it has the date.

01:28:37.280 --> 01:28:38.580
It has the pod IP.

01:28:38.580 --> 01:28:40.820
It is running in.

01:28:41.040 --> 01:28:42.680
And the success code 200.

01:28:42.840 --> 01:28:43.980
It means it is successful.

01:28:44.760 --> 01:28:46.440
This is how we see the logs.

01:28:47.380 --> 01:28:48.380
So the checks are passing.

01:28:48.480 --> 01:28:49.740
So there is no restarts.

01:28:50.680 --> 01:28:52.900
Ok. So now this is our success.

01:28:53.660 --> 01:28:54.680
So now let's

01:28:54.680 --> 01:28:56.440
go ahead and do the next one

01:28:56.440 --> 01:28:58.520
which is wrong. So let's

01:28:58.520 --> 01:29:01.060
go ahead and see

01:29:01.060 --> 01:29:02.360
the live fail.

01:29:03.420 --> 01:29:04.460
So say

01:29:04.460 --> 01:29:05.840
say.n

01:29:05.840 --> 01:29:06.140
and

01:29:08.020 --> 01:29:08.660
the

01:29:09.800 --> 01:29:10.440
command.

01:29:12.340 --> 01:29:14.040
It is the same what we did for this

01:29:14.040 --> 01:29:15.700
and see what the log says.

01:29:16.980 --> 01:29:18.060
And observe the describe.

01:29:18.620 --> 01:29:19.280
Please observe everything.

01:29:20.040 --> 01:29:21.840
Ok. So now apply

01:29:23.120 --> 01:29:24.340
hyphen f

01:29:24.340 --> 01:29:25.960
and this.

01:29:26.740 --> 01:29:27.820
So now

01:29:27.820 --> 01:29:29.900
do a get pods hyphen o

01:29:29.900 --> 01:29:30.480
and white.

01:29:32.160 --> 01:29:33.560
You see it is

01:29:34.120 --> 01:29:35.980
Now do a describe of the pod.

01:29:36.080 --> 01:29:37.560
Describe of the pod.

01:29:39.340 --> 01:29:39.660
And engine

01:29:39.660 --> 01:29:41.400
x hyphen liveness fail.

01:29:41.560 --> 01:29:43.860
Now you see that

01:29:43.860 --> 01:29:45.420
it is going to fail because

01:29:45.420 --> 01:29:46.420
not have find the file.

01:29:49.580 --> 01:29:51.480
So wait for some time.

01:29:51.640 --> 01:29:53.080
You can also do a describe.

01:29:55.060 --> 01:29:55.600
And you see

01:29:55.600 --> 01:29:57.380
this. Again you describe.

01:29:57.880 --> 01:29:59.600
Wait for 10 or 15 seconds

01:29:59.600 --> 01:30:01.560
and do a describe again. You see liveness

01:30:01.560 --> 01:30:02.200
fail.

01:30:03.140 --> 01:30:05.160
Because not able to find it.

01:30:05.480 --> 01:30:07.720
So now you can

01:30:07.720 --> 01:30:08.480
do a logs.

01:30:10.300 --> 01:30:11.340
And you see restart

01:30:11.340 --> 01:30:12.180
happen once.

01:30:13.820 --> 01:30:14.900
Now do a logs

01:30:15.560 --> 01:30:17.560
of the pod. And you will see that

01:30:18.220 --> 01:30:19.500
it say the health check

01:30:19.500 --> 01:30:21.440
fail. So it will do at least 3

01:30:21.440 --> 01:30:23.340
or 4 times. And after that

01:30:23.340 --> 01:30:25.480
it will restart or it will

01:30:25.480 --> 01:30:26.800
become a crash loop back off.

01:30:26.960 --> 01:30:28.180
It will do a crash loop back off.

01:30:29.360 --> 01:30:30.320
So it will wait

01:30:30.320 --> 01:30:32.340
45 seconds every time, 5 times

01:30:32.340 --> 01:30:34.360
and then do a crash loop back off.

01:30:35.340 --> 01:30:36.160
So 2 times.

01:30:36.420 --> 01:30:37.960
So wait for some time and

01:30:37.960 --> 01:30:39.660
you will see the logs get failed.

01:31:06.460 --> 01:31:08.580
See 4 times.

01:31:09.620 --> 01:31:10.360
5 times.

01:31:11.360 --> 01:31:13.040
And after 5 times

01:31:13.040 --> 01:31:16.260
it will do a

01:31:16.260 --> 01:31:16.760
reboot.

01:31:16.980 --> 01:31:18.320
It will go crash loop back off.

01:31:18.540 --> 01:31:19.940
It will crash off.

01:31:24.480 --> 01:31:25.160
You see here

01:31:25.160 --> 01:31:26.300
it is trying.

01:31:27.100 --> 01:31:27.860
So it tried.

01:31:28.160 --> 01:31:30.000
This time

01:31:30.000 --> 01:31:32.420
keep on trying.

01:31:33.900 --> 01:31:34.560
Trying, trying,

01:31:34.760 --> 01:31:35.940
trying, 1044,

01:31:36.020 --> 01:31:37.460
1044, trying.

01:31:39.040 --> 01:31:39.660
It failed.

01:31:39.820 --> 01:31:41.340
It is gracefully shutting down.

01:31:41.800 --> 01:31:44.480
Now when you see this it will crash loop back off.

01:31:44.740 --> 01:31:45.400
Okay, are we good?

01:31:46.320 --> 01:31:47.180
This is one method.

01:31:47.720 --> 01:31:49.880
We can also use the other method

01:31:49.880 --> 01:31:51.560
in which we talk about TCP.

01:31:52.020 --> 01:31:53.540
So TCP is one more protocol

01:31:53.540 --> 01:31:56.100
which works on port 8080.

01:31:56.780 --> 01:31:58.360
So you can also do

01:31:58.360 --> 01:32:00.320
with port 8080.

01:32:01.120 --> 01:32:02.060
And it will work

01:32:02.060 --> 01:32:03.640
because the ports are number right.

01:32:05.520 --> 01:32:06.520
And in here

01:32:06.520 --> 01:32:07.900
we do a small example in which

01:32:07.900 --> 01:32:09.340
we are trying to make it a fail

01:32:09.340 --> 01:32:12.360
by giving a different port number 8090.

01:32:12.580 --> 01:32:13.260
This is wrong.

01:32:14.260 --> 01:32:16.040
So it will not be able to reach on

01:32:16.040 --> 01:32:18.300
port 8090 on your container.

01:32:19.160 --> 01:32:19.860
And hence

01:32:19.860 --> 01:32:21.240
the health check would fail.

01:32:22.280 --> 01:32:24.000
So like this we can either

01:32:24.000 --> 01:32:26.740
in actuals it will be the actual numbers

01:32:26.740 --> 01:32:28.080
actual location but

01:32:28.080 --> 01:32:30.200
quite difficult to replicate the actual data.

01:32:31.040 --> 01:32:32.060
So here just

01:32:32.060 --> 01:32:33.940
to show you how

01:32:33.940 --> 01:32:36.180
your health check fails and passes

01:32:36.180 --> 01:32:38.060
we are doing some small examples.

01:32:40.560 --> 01:32:41.540
Are we clear?

01:32:46.080 --> 01:32:46.560
Everyone?

01:32:50.060 --> 01:32:51.000
Any questions?

01:32:59.600 --> 01:33:00.280
Okay.

01:33:00.560 --> 01:33:02.220
Now we forgot the best practices

01:33:02.220 --> 01:33:03.560
let me go to best practices

01:33:03.560 --> 01:33:06.020
and also cron I think we will come back to here.

01:33:06.380 --> 01:33:07.900
So best practices when you work with

01:33:07.900 --> 01:33:10.300
the deployment is start always

01:33:10.300 --> 01:33:11.400
scanning the images.

01:33:12.240 --> 01:33:13.940
So whatever images you use

01:33:13.940 --> 01:33:15.960
always ensure that the images

01:33:15.960 --> 01:33:18.120
are secure, your private

01:33:18.120 --> 01:33:20.300
images which is tested

01:33:20.300 --> 01:33:22.060
and do regular scanning.

01:33:23.360 --> 01:33:24.480
Regularly update

01:33:25.240 --> 01:33:26.260
your updates.

01:33:26.280 --> 01:33:28.100
For example we do regularly we want to

01:33:28.100 --> 01:33:29.620
always add update.

01:33:29.620 --> 01:33:32.000
Post this in your contents because you always want to get

01:33:32.000 --> 01:33:33.100
the updated ones.

01:33:33.900 --> 01:33:35.720
Ensure that you use only authorized images.

01:33:37.400 --> 01:33:38.160
No access

01:33:38.160 --> 01:33:40.300
when you work in enterprises you will not

01:33:40.300 --> 01:33:41.860
get access to worker nodes.

01:33:43.280 --> 01:33:44.300
Any work must be

01:33:44.300 --> 01:33:45.160
done for the master.

01:33:46.700 --> 01:33:47.820
Define policies

01:33:47.820 --> 01:33:50.060
as to what resources can be communicated.

01:33:51.180 --> 01:33:51.900
Network

01:33:53.420 --> 01:33:54.140
Apply

01:33:54.140 --> 01:33:55.520
the privileges

01:33:56.060 --> 01:33:57.260
and everything

01:33:57.260 --> 01:33:59.020
log everything whatever you are doing.

01:33:59.440 --> 01:34:00.420
What is cron job?

01:34:03.280 --> 01:34:04.180
Yes no?

01:34:04.700 --> 01:34:06.420
So like in windows

01:34:06.420 --> 01:34:08.340
we have dot back schedulers

01:34:08.340 --> 01:34:10.420
we call them windows back schedulers.

01:34:10.820 --> 01:34:12.040
Similarly we have

01:34:12.040 --> 01:34:14.680
cron jobs for linux schedulers.

01:34:14.760 --> 01:34:16.240
You can go and see this.

01:34:16.440 --> 01:34:18.120
It looks something like this.

01:34:18.700 --> 01:34:20.680
So it is crontag.query

01:34:20.680 --> 01:34:22.040
in which you can go. For example

01:34:22.040 --> 01:34:24.060
I want to schedule a job in this time

01:34:24.060 --> 01:34:25.000
on this date.

01:34:26.460 --> 01:34:28.200
So if there is two asterisks

01:34:28.200 --> 01:34:30.060
in here it means

01:34:30.060 --> 01:34:32.360
it is going to every minute

01:34:32.360 --> 01:34:33.780
the first one is minute

01:34:33.780 --> 01:34:36.420
the second field is hour

01:34:36.420 --> 01:34:38.440
the third one is day

01:34:38.440 --> 01:34:40.120
like 28 numbers

01:34:40.120 --> 01:34:42.140
talk about. This is the month

01:34:42.720 --> 01:34:44.120
and this is the day.

01:34:44.880 --> 01:34:46.180
So example I can

01:34:46.180 --> 01:34:47.880
put five. It means every

01:34:47.880 --> 01:34:50.520
Friday. Now if I put

01:34:50.520 --> 01:34:52.300
in here fifth it means

01:34:52.300 --> 01:34:53.480
May we are talking about.

01:34:54.520 --> 01:34:56.380
And in here I can say

01:34:56.380 --> 01:34:58.320
25th on day of the month

01:34:58.320 --> 01:34:58.900
25.

01:35:00.760 --> 01:35:02.440
In here I can mention

01:35:02.440 --> 01:35:04.180
I can mention in here

01:35:05.340 --> 01:35:05.940
that

01:35:06.700 --> 01:35:08.460
So this is going to take

01:35:08.460 --> 01:35:10.160
exactly some work

01:35:10.160 --> 01:35:11.740
at 12 12 o'clock

01:35:11.740 --> 01:35:14.360
12 1 on May 25

01:35:15.020 --> 01:35:15.980
which is on Friday.

01:35:16.080 --> 01:35:18.000
Or you can just even give

01:35:18.000 --> 01:35:20.760
zero for example

01:35:20.760 --> 01:35:22.780
I am going to take it

01:35:22.780 --> 01:35:24.160
zero means Sunday

01:35:28.340 --> 01:35:30.160
So we can do something

01:35:30.160 --> 01:35:32.020
like this. We also have an object

01:35:32.020 --> 01:35:33.080
called as cront.

01:35:34.560 --> 01:35:35.560
So if you search for cront

01:35:35.560 --> 01:35:37.800
they are very good document. You can just go and search anything

01:35:37.800 --> 01:35:38.440
whatever you want.

01:35:39.860 --> 01:35:41.220
So cront job is an example.

01:35:41.220 --> 01:35:42.040
Ok what does this do?

01:35:44.360 --> 01:35:44.960
It can be louder

01:35:46.780 --> 01:35:47.220
no issues.

01:35:47.580 --> 01:35:48.660
It is going to run every minute.

01:35:48.760 --> 01:35:49.860
What is going to run every minute?

01:35:52.040 --> 01:35:53.340
Yes so this is

01:35:53.340 --> 01:35:54.920
going to get printed every minute.

01:35:54.920 --> 01:35:56.320
So you can apply this

01:35:56.320 --> 01:35:58.180
and then we can see the output.

01:35:58.220 --> 01:36:00.220
So let's try to do this play around.

01:36:00.540 --> 01:36:01.140
Let me give this.

01:36:03.900 --> 01:36:04.780
cront.yaml

01:36:04.780 --> 01:36:05.800
insert mode

01:36:06.780 --> 01:36:08.080
and paste the contents.

01:36:08.980 --> 01:36:10.360
So this is doing

01:36:10.360 --> 01:36:12.120
it is going inside

01:36:12.120 --> 01:36:13.300
your shell.

01:36:13.480 --> 01:36:16.380
Just printing it with this message.

01:36:17.720 --> 01:36:19.560
So let's save this.

01:36:19.860 --> 01:36:20.080
And apply.

01:36:21.740 --> 01:36:22.980
iPhone F

01:36:22.980 --> 01:36:24.080
cront.yaml

01:36:25.720 --> 01:36:26.900
So if we say

01:36:26.900 --> 01:36:28.180
get all example

01:36:28.180 --> 01:36:29.680
you see that or you can say

01:36:29.680 --> 01:36:30.400
get jobs.

01:36:31.820 --> 01:36:33.120
Also say cront job.

01:36:34.740 --> 01:36:35.440
Get cront job.

01:36:36.740 --> 01:36:37.920
And get pods.

01:36:38.120 --> 01:36:39.720
So it has got created one.

01:36:40.720 --> 01:36:41.960
So do a get cront job

01:36:41.960 --> 01:36:43.320
when you want to see what is there.

01:36:43.480 --> 01:36:45.140
You see get cront job. This is your job.

01:36:46.420 --> 01:36:47.920
And now get pods happen one.

01:36:48.040 --> 01:36:48.960
You see it is completed.

01:36:49.140 --> 01:36:50.260
Do logs of that pod.

01:36:51.880 --> 01:36:53.360
Do logs of that pod.

01:36:54.300 --> 01:36:55.760
And you will see the logs

01:36:55.760 --> 01:36:56.740
are printed.

01:36:57.380 --> 01:36:58.140
Hello from.

01:36:59.640 --> 01:37:00.840
Wait for one more minute.

01:37:01.180 --> 01:37:03.700
So it again created

01:37:03.700 --> 01:37:04.380
one more.

01:37:06.320 --> 01:37:06.840
38

01:37:07.480 --> 01:37:08.520
still not created.

01:37:10.120 --> 01:37:11.640
10 more seconds.

01:37:12.660 --> 01:37:13.860
And you will be seeing the

01:37:13.860 --> 01:37:14.860
output of that also.

01:37:15.040 --> 01:37:17.580
So go ahead and do a logs of this.

01:37:17.780 --> 01:37:18.940
You see the hello from cluster.

01:37:20.760 --> 01:37:21.540
So this is

01:37:21.540 --> 01:37:22.640
a simple example.

01:37:23.160 --> 01:37:25.560
So like this you can define some mapping.

01:37:26.080 --> 01:37:27.640
Like what is for empty directory

01:37:27.640 --> 01:37:29.540
some location or file. You can say

01:37:29.540 --> 01:37:31.820
copy the files to a specific location.

01:37:31.820 --> 01:37:33.520
Like a backup.

01:37:34.500 --> 01:37:35.920
Or some specific

01:37:36.700 --> 01:37:37.860
scripts to run.

01:37:38.260 --> 01:37:38.760
At that time.

01:37:39.400 --> 01:37:40.500
We can use a cront job.

01:37:41.920 --> 01:37:43.800
Any questions? So what have we learned

01:37:43.800 --> 01:37:45.780
in deployment? Let's summarize deployment.

01:37:46.440 --> 01:37:47.760
So we first learned about

01:37:47.760 --> 01:37:49.760
deployments. Deployments are very important.

01:37:50.360 --> 01:37:52.200
And this is what we use in enterprises.

01:37:52.960 --> 01:37:53.620
To create.

01:37:54.140 --> 01:37:55.480
So once we create a deployment.

01:37:55.880 --> 01:37:57.480
It first creates a deployment.

01:37:58.380 --> 01:38:00.040
That deployment creates a replica

01:38:00.040 --> 01:38:02.040
asset. And that replica asset

01:38:02.040 --> 01:38:04.060
creates your pods. This is what we use

01:38:04.060 --> 01:38:05.500
for releases and updates.

01:38:06.880 --> 01:38:07.840
So deployment to replica

01:38:07.840 --> 01:38:08.860
asset says clearly.

01:38:10.340 --> 01:38:12.320
And the pods will get created from your deployment.

01:38:12.800 --> 01:38:14.220
You can roll back.

01:38:14.580 --> 01:38:15.980
Scale up. Pause.

01:38:16.700 --> 01:38:18.260
For all we talk about kinder

01:38:18.260 --> 01:38:19.700
deployment. It's very very important.

01:38:19.840 --> 01:38:22.100
How do all these components get

01:38:22.100 --> 01:38:24.380
linked to each other? Use labels in the backends.

01:38:25.140 --> 01:38:26.040
Labels are tag

01:38:26.040 --> 01:38:28.400
names which we give. To identify

01:38:28.400 --> 01:38:30.960
what is the use of the

01:38:30.960 --> 01:38:32.580
particular components.

01:38:33.780 --> 01:38:34.480
How do we

01:38:34.480 --> 01:38:36.240
do some operations on it?

01:38:37.300 --> 01:38:38.640
For that we can use this.

01:38:39.220 --> 01:38:40.400
We can have multiple labels

01:38:40.400 --> 01:38:42.760
for a pod. We can filter it using selectors.

01:38:43.060 --> 01:38:44.540
So when you create a deployment. Request

01:38:44.540 --> 01:38:46.160
goes to API first.

01:38:46.940 --> 01:38:48.360
Then to controller manager.

01:38:49.480 --> 01:38:50.580
This will create your replica

01:38:50.580 --> 01:38:52.760
asset. And then the scheduler

01:38:52.760 --> 01:38:54.500
would come in. And

01:38:54.500 --> 01:38:56.280
it decides which node.

01:38:56.280 --> 01:38:58.700
And kubelet would create the pod

01:38:58.700 --> 01:39:00.180
on the particular nodes.

01:39:01.100 --> 01:39:02.280
And deployment normally does

01:39:03.140 --> 01:39:04.720
load balancing by default.

01:39:05.060 --> 01:39:06.540
So if you say that you want

01:39:06.540 --> 01:39:08.520
five pods. We create two in one.

01:39:08.860 --> 01:39:09.940
Three in one. Something like this.

01:39:10.060 --> 01:39:12.600
Replica asset remembers the current state.

01:39:13.660 --> 01:39:14.440
If anything is there

01:39:14.440 --> 01:39:16.500
it will again help to ensure that it is going

01:39:16.500 --> 01:39:18.540
to the current desired checkmatch match.

01:39:19.160 --> 01:39:20.280
Different methods to update.

01:39:20.480 --> 01:39:21.840
The default one is rolling update.

01:39:22.040 --> 01:39:24.260
You can roll back to previous versions by doing

01:39:24.260 --> 01:39:26.180
recording it.

01:39:26.260 --> 01:39:28.680
And you can also integrate with your CICD tools.

01:39:29.080 --> 01:39:30.720
Like Jenkins or TeamCity

01:39:30.720 --> 01:39:32.520
other tools. To make it

01:39:32.520 --> 01:39:33.340
much more easier.

01:39:33.700 --> 01:39:35.640
To update you create new replica asset.

01:39:36.680 --> 01:39:38.200
It removes all the new replica asset

01:39:38.200 --> 01:39:38.720
practices.

01:39:41.580 --> 01:39:42.500
So do you want to do some

01:39:42.500 --> 01:39:44.160
more topics or we are good?

01:39:44.260 --> 01:39:45.920
What do you say? What do you want to say?

01:39:46.040 --> 01:39:47.560
If we don't talk I will keep on talking.

01:39:47.800 --> 01:39:50.360
If we don't talk I will keep on talking myself.

01:39:50.640 --> 01:39:52.220
What do you want to do? Either you want to talk

01:39:52.220 --> 01:39:53.640
or you want to say yes or no.

01:39:53.720 --> 01:39:55.100
Keep on talking. What do you want to do?

01:39:55.320 --> 01:39:57.700
Yes Charles? Gene? Others?

01:39:58.620 --> 01:40:00.060
I want you to talk. What's the answer?

01:40:00.760 --> 01:40:01.920
Do you want to continue?

01:40:02.500 --> 01:40:04.280
Or we are good? I want to understand

01:40:04.280 --> 01:40:05.820
what's happening in your mind.

01:40:06.780 --> 01:40:08.400
It's quite difficult for me too.

01:40:09.440 --> 01:40:10.180
You're feeling hungry?

01:40:11.660 --> 01:40:12.620
We have

01:40:12.620 --> 01:40:13.880
topics. I think

01:40:13.880 --> 01:40:16.160
we are in the right phase.

01:40:16.400 --> 01:40:17.720
See I don't have any because

01:40:17.720 --> 01:40:20.200
I know the

01:40:20.200 --> 01:40:22.120
participants. I cannot decide

01:40:22.120 --> 01:40:23.960
which topic. For example

01:40:23.960 --> 01:40:26.400
some participants are very fast, some are slow.

01:40:27.640 --> 01:40:28.360
So based

01:40:28.360 --> 01:40:29.900
on the participants I

01:40:29.900 --> 01:40:31.000
map my schedule.

01:40:32.860 --> 01:40:34.400
Otherwise I will keep on

01:40:34.400 --> 01:40:36.180
it's very difficult to map. So the reason

01:40:36.180 --> 01:40:38.580
I always look into how are the participants

01:40:38.580 --> 01:40:39.920
how are they learning

01:40:39.920 --> 01:40:42.380
what is your learning speed

01:40:42.380 --> 01:40:44.540
and then I paste my topics.

01:40:46.160 --> 01:40:48.320
So what I feel is

01:40:48.320 --> 01:40:50.580
as per your speed

01:40:50.580 --> 01:40:52.100
I think we are good.

01:40:52.100 --> 01:40:54.480
We have done. We are good.

01:40:54.660 --> 01:40:56.480
We have done a lot today. We learned about

01:40:56.480 --> 01:40:58.040
Kubernetes. We installed Kubernetes.

01:40:58.580 --> 01:40:59.740
Namespaces in here.

01:41:00.620 --> 01:41:02.480
So if we are doing the same speed

01:41:02.480 --> 01:41:03.720
tomorrow we are good.

01:41:05.280 --> 01:41:06.420
But if you want I can still

01:41:06.420 --> 01:41:08.340
talk about. It all

01:41:08.340 --> 01:41:09.840
depends. Are you okay to continue?

01:41:10.340 --> 01:41:12.280
Are you able to take in more information?

01:41:12.480 --> 01:41:14.200
That's my question. Each one can give the opinion.

01:41:14.720 --> 01:41:15.420
We'll decide.

01:41:15.420 --> 01:41:17.660
How many wants to continue? Say yes

01:41:17.660 --> 01:41:19.400
in the chat or no in the chat. Anything is okay.

01:41:19.500 --> 01:41:21.680
Gene, we want to start. Let's start with you.

01:41:21.920 --> 01:41:23.340
Please. Say yes or no in the chat.

01:41:23.720 --> 01:41:25.500
Others? Fine. Let's continue.

01:41:26.760 --> 01:41:27.860
Next topic is

01:41:27.860 --> 01:41:29.240
networking. In networking

01:41:30.240 --> 01:41:31.180
we learned

01:41:31.180 --> 01:41:33.560
when you add in the CNI

01:41:33.560 --> 01:41:35.480
the CNI is what

01:41:35.480 --> 01:41:36.940
giving IP addresses.

01:41:37.940 --> 01:41:39.320
Allowing them to communicate.

01:41:40.480 --> 01:41:41.500
All the communication

01:41:41.500 --> 01:41:43.520
network. All these things. They get

01:41:43.520 --> 01:41:45.680
IP addresses, MAC addresses. All these

01:41:45.680 --> 01:41:47.700
because of the CNI which you

01:41:47.700 --> 01:41:48.080
added.

01:41:50.120 --> 01:41:51.420
Now WeaveNet

01:41:51.420 --> 01:41:53.320
or Calico

01:41:53.320 --> 01:41:55.580
or Flannel. All these

01:41:55.580 --> 01:41:57.300
provide networking features for the

01:41:57.300 --> 01:41:58.900
Kubernetes. That's what we learned.

01:42:00.140 --> 01:42:01.620
Now we have one more concept networking

01:42:01.620 --> 01:42:02.280
services.

01:42:03.520 --> 01:42:04.360
For example

01:42:05.580 --> 01:42:07.480
these are your back end

01:42:07.480 --> 01:42:08.080
pods.

01:42:10.720 --> 01:42:11.400
Now

01:42:11.400 --> 01:42:13.260
if the containers

01:42:13.260 --> 01:42:15.600
I cannot directly restart my

01:42:15.600 --> 01:42:16.000
pod.

01:42:17.160 --> 01:42:19.440
But I can, the back end start and

01:42:19.440 --> 01:42:20.520
stop my containers.

01:42:21.760 --> 01:42:23.500
So if I do a start and stop

01:42:23.500 --> 01:42:25.180
you see

01:42:25.180 --> 01:42:26.900
the IP changes.

01:42:27.060 --> 01:42:29.080
And if I'm a user, if I have

01:42:29.080 --> 01:42:30.680
set up some session

01:42:31.400 --> 01:42:33.640
that I have to use 192

01:42:33.640 --> 01:42:35.480
something. You see 192

01:42:36.520 --> 01:42:37.120
168

01:42:37.120 --> 01:42:38.480
2.32

01:42:39.280 --> 01:42:40.980
It will not work for me

01:42:40.980 --> 01:42:42.860
because the IP changed.

01:42:43.480 --> 01:42:44.840
Or this is not again trying to communicate

01:42:44.840 --> 01:42:46.380
with this IP. It will not work.

01:42:47.520 --> 01:42:48.900
So this is not very

01:42:48.900 --> 01:42:50.480
good. It might stop your

01:42:51.640 --> 01:42:52.840
working of some

01:42:52.840 --> 01:42:54.100
components or applications.

01:42:55.600 --> 01:42:57.040
And we cannot directly assign

01:42:57.040 --> 01:42:58.360
a static IP to this.

01:42:59.460 --> 01:43:00.900
So we have to use

01:43:00.900 --> 01:43:02.580
some middlemen.

01:43:02.780 --> 01:43:03.740
As per the service.

01:43:05.420 --> 01:43:06.400
So what we do.

01:43:06.400 --> 01:43:08.660
Example you create a blue deployment.

01:43:08.680 --> 01:43:10.180
You see blue color.

01:43:10.400 --> 01:43:12.000
With replicas 3.

01:43:12.360 --> 01:43:13.420
And you use a label.

01:43:14.840 --> 01:43:15.940
Like app equal to blue.

01:43:16.060 --> 01:43:18.380
Use this label. Now I want

01:43:18.380 --> 01:43:20.180
to map to a service. So I say

01:43:20.180 --> 01:43:22.260
kind service.

01:43:23.980 --> 01:43:24.340
And

01:43:24.340 --> 01:43:26.220
I would use the same label.

01:43:26.880 --> 01:43:28.640
App equal to blue. See.

01:43:29.740 --> 01:43:30.380
So since

01:43:30.380 --> 01:43:32.620
the label names are getting

01:43:32.620 --> 01:43:34.320
mapped. This and these

01:43:34.320 --> 01:43:35.180
are getting mapped.

01:43:36.220 --> 01:43:38.540
And this gets a public static IP.

01:43:39.520 --> 01:43:40.300
So user now

01:43:40.300 --> 01:43:42.440
first user hits it.

01:43:43.460 --> 01:43:44.200
He logs in using

01:43:44.200 --> 01:43:46.120
this IP. The traffic

01:43:46.120 --> 01:43:48.360
will go to this one. For example.

01:43:49.440 --> 01:43:50.180
If a second user

01:43:50.180 --> 01:43:51.520
tries to access it.

01:43:52.340 --> 01:43:54.180
The traffic will go to this.

01:43:54.600 --> 01:43:56.540
And then reaches the second one.

01:43:57.320 --> 01:43:58.580
Third user comes in.

01:43:59.040 --> 01:44:00.440
Hits it. The traffic

01:44:00.440 --> 01:44:02.440
will go to the third one. So instead of

01:44:02.440 --> 01:44:04.340
reaching directly you.

01:44:04.340 --> 01:44:06.940
The traffic will go via the static IP.

01:44:08.180 --> 01:44:08.480
Same for

01:44:08.480 --> 01:44:10.580
other application. Now other application.

01:44:11.120 --> 01:44:12.600
You create a deployment.

01:44:12.840 --> 01:44:14.620
For a pod. And map it to a

01:44:14.620 --> 01:44:16.420
service. You want to reach the application.

01:44:16.700 --> 01:44:18.400
It will reach to this. And then reaches

01:44:18.400 --> 01:44:19.660
here. I'm getting it.

01:44:20.320 --> 01:44:22.320
Similarly this wants to communicate to

01:44:22.320 --> 01:44:24.640
blue. It will go to

01:44:24.640 --> 01:44:25.460
this service.

01:44:26.240 --> 01:44:28.280
And this will send the traffic to either this

01:44:28.280 --> 01:44:30.640
or this or this. Any communication

01:44:30.640 --> 01:44:32.600
will be in the back end using services.

01:44:33.520 --> 01:44:34.760
And these are very important

01:44:34.760 --> 01:44:36.940
because the IP keeps on

01:44:36.940 --> 01:44:38.800
changing. And unless

01:44:38.800 --> 01:44:40.760
until you use a service.

01:44:41.080 --> 01:44:42.820
They may not be able to reach the

01:44:42.820 --> 01:44:43.700
back ends properly.

01:44:45.500 --> 01:44:46.640
And this is

01:44:47.480 --> 01:44:48.100
part of

01:44:48.640 --> 01:44:51.000
your cluster. So this could be your

01:44:51.000 --> 01:44:52.920
master. Would put your

01:44:52.920 --> 01:44:54.640
worker one and worker two.

01:44:55.580 --> 01:44:56.720
The services

01:44:56.720 --> 01:44:58.580
across the cluster. You see.

01:44:58.580 --> 01:44:59.820
It's common.

01:45:00.820 --> 01:45:01.980
Green or blue.

01:45:02.760 --> 01:45:04.640
It's a cluster service.

01:45:04.980 --> 01:45:06.300
It's called internet.

01:45:07.140 --> 01:45:07.920
What is internet?

01:45:08.660 --> 01:45:10.940
Now this is your application

01:45:10.940 --> 01:45:11.860
for example.

01:45:13.140 --> 01:45:14.620
And this is your database.

01:45:16.200 --> 01:45:16.700
Now this

01:45:16.700 --> 01:45:18.500
wants to communicate to this. So what it will do.

01:45:18.560 --> 01:45:20.380
It will go and hit

01:45:20.380 --> 01:45:22.620
the service. And that will send

01:45:22.620 --> 01:45:24.260
the traffic to this.

01:45:25.360 --> 01:45:26.560
So only if this want to communicate

01:45:26.560 --> 01:45:28.680
to database this. It will communicate to this.

01:45:29.040 --> 01:45:30.140
And reaches in here.

01:45:31.880 --> 01:45:32.400
And

01:45:32.400 --> 01:45:34.360
you have to use a kube proxy. Kube proxy

01:45:34.360 --> 01:45:36.320
network rules. You have to use a port number

01:45:36.320 --> 01:45:38.700
80 for kube proxy. And then

01:45:38.700 --> 01:45:40.140
it reaches the service.

01:45:40.320 --> 01:45:42.540
It reaches the service. And then reaches

01:45:42.540 --> 01:45:44.080
the back ends. This is for internet.

01:45:44.740 --> 01:45:47.120
Now the next one. Which is

01:45:47.120 --> 01:45:48.720
testers node port.

01:45:49.260 --> 01:45:50.700
Is used in your

01:45:50.700 --> 01:45:52.800
pre-prod

01:45:52.800 --> 01:45:53.700
or a cd.

01:45:53.700 --> 01:45:54.700
What is cd?

01:45:54.940 --> 01:45:55.560
What is staging?

01:45:59.400 --> 01:46:00.220
Testing area.

01:46:00.220 --> 01:46:00.400
Testing area.

01:46:01.320 --> 01:46:03.660
You all work on agile. You all work on releases.

01:46:05.480 --> 01:46:06.280
So enterprises

01:46:06.280 --> 01:46:07.920
you will work on dev environment.

01:46:08.940 --> 01:46:09.980
You work on test.

01:46:10.740 --> 01:46:11.880
And then you

01:46:11.880 --> 01:46:13.700
release it in pre-prod.

01:46:14.580 --> 01:46:15.300
Or a staging.

01:46:16.560 --> 01:46:17.680
And then use your prod.

01:46:17.820 --> 01:46:18.560
Do you agree? Production.

01:46:20.240 --> 01:46:21.260
So before we

01:46:21.260 --> 01:46:22.680
lie we have to do a staging.

01:46:24.220 --> 01:46:25.260
So now

01:46:25.260 --> 01:46:27.120
I am using node port

01:46:27.120 --> 01:46:29.360
in my staging area. How does

01:46:29.360 --> 01:46:31.480
it work? You need to

01:46:31.480 --> 01:46:33.280
mention a kind. Again

01:46:33.280 --> 01:46:34.320
as a service.

01:46:35.060 --> 01:46:37.620
And we can use any port number between

01:46:37.620 --> 01:46:39.200
30,000

01:46:39.200 --> 01:46:41.440
and 3276.

01:46:41.460 --> 01:46:42.920
Any port number you can mention.

01:46:43.800 --> 01:46:45.760
And the type would be

01:46:45.760 --> 01:46:47.480
node port. And the port number

01:46:47.480 --> 01:46:49.420
you can mention like 30,000.

01:46:49.420 --> 01:46:51.640
For example.

01:46:51.840 --> 01:46:53.440
If you do this the same

01:46:53.440 --> 01:46:55.380
port number would be exposed in all

01:46:55.380 --> 01:46:57.440
the nodes including a master. And if this is

01:46:57.440 --> 01:46:59.340
your web server you don't want to access

01:46:59.340 --> 01:47:01.220
the traffic could go

01:47:01.780 --> 01:47:03.360
so you are testing it.

01:47:03.360 --> 01:47:05.500
So you would use the public IP of this machine

01:47:05.500 --> 01:47:07.560
of like master public IP.

01:47:07.640 --> 01:47:09.260
The public IP of this machine.

01:47:09.460 --> 01:47:11.380
If you type in public

01:47:11.380 --> 01:47:13.120
IP of the master

01:47:13.760 --> 01:47:15.420
colon 30,000.

01:47:16.180 --> 01:47:17.140
It will go to this.

01:47:17.700 --> 01:47:19.540
Then it will go into this service

01:47:19.540 --> 01:47:21.140
and reaches to here.

01:47:22.360 --> 01:47:23.460
Now if I type in public

01:47:23.460 --> 01:47:25.400
IP of worker one. It will go

01:47:25.400 --> 01:47:27.000
to the node port

01:47:27.000 --> 01:47:29.280
of this machine. It goes to crew proxy.

01:47:29.420 --> 01:47:31.080
It goes to this and reaches it.

01:47:31.500 --> 01:47:33.040
If I type in public IP of this machine.

01:47:33.100 --> 01:47:35.140
I want to reach it. It goes to this.

01:47:35.700 --> 01:47:37.240
Put queue proxy. And then

01:47:37.240 --> 01:47:38.080
reaches in here.

01:47:40.300 --> 01:47:41.540
This is what is node port.

01:47:41.600 --> 01:47:43.420
We cannot expose the outside world

01:47:44.100 --> 01:47:45.280
because we cannot

01:47:45.280 --> 01:47:46.880
give public IP to the others.

01:47:48.360 --> 01:47:49.220
Let me give us

01:47:49.220 --> 01:47:51.120
different easier method

01:47:51.120 --> 01:47:53.180
to see this also easily.

01:48:01.180 --> 01:48:02.640
Please save this link at your end.

01:48:03.000 --> 01:48:05.280
Let's see this link. I paste this link

01:48:06.580 --> 01:48:07.380
in the chat.

01:48:08.360 --> 01:48:09.400
So other way to look

01:48:09.400 --> 01:48:11.580
around the node port is something like this.

01:48:11.920 --> 01:48:12.680
So you see here

01:48:12.680 --> 01:48:15.180
any traffic comes to crew proxy.

01:48:16.080 --> 01:48:16.800
Now if you see

01:48:16.800 --> 01:48:18.040
for node it is a node port.

01:48:18.760 --> 01:48:20.580
The traffic is coming from internet.

01:48:21.700 --> 01:48:23.580
It reaches the node port

01:48:23.580 --> 01:48:24.340
in here.

01:48:25.180 --> 01:48:26.480
So if you create a node port.

01:48:26.620 --> 01:48:28.040
It creates a cluster service.

01:48:28.500 --> 01:48:30.680
It also exposes the port on your

01:48:32.020 --> 01:48:32.460
external.

01:48:32.920 --> 01:48:34.580
The traffic comes like this.

01:48:34.820 --> 01:48:36.620
Reaches your cluster service.

01:48:37.120 --> 01:48:38.420
And then reaches in here.

01:48:39.340 --> 01:48:40.640
Traffic comes from outside.

01:48:40.640 --> 01:48:42.220
It reaches the node port number.

01:48:42.360 --> 01:48:44.320
Then reaches cluster service. Reaches in here.

01:48:45.260 --> 01:48:46.440
This is what is node port.

01:48:47.460 --> 01:48:48.400
And enterprises

01:48:48.400 --> 01:48:50.200
the DevOps engineer

01:48:50.200 --> 01:48:52.300
they play around by using node port.

01:48:53.140 --> 01:48:54.740
And then once it is good

01:48:54.740 --> 01:48:56.640
then they configure load balancer

01:48:56.640 --> 01:48:58.440
on top of this. Because

01:48:58.440 --> 01:49:00.620
the traffic, it can, more

01:49:00.620 --> 01:49:02.040
traffic can go into this.

01:49:02.440 --> 01:49:04.200
Less to this. Less to we need to have load balancer.

01:49:04.840 --> 01:49:06.120
So once you test this

01:49:06.120 --> 01:49:08.520
and then we go ahead and create load balancer

01:49:08.520 --> 01:49:09.460
on top of this.

01:49:10.220 --> 01:49:12.620
It could be your VMware load balancer

01:49:12.620 --> 01:49:14.960
we can use or F5 load balancer

01:49:14.960 --> 01:49:16.840
or AWS load balancers.

01:49:17.080 --> 01:49:18.260
Or we can use Ingress

01:49:18.260 --> 01:49:20.540
controllers. All these we

01:49:20.540 --> 01:49:22.520
can use instead of

01:49:23.300 --> 01:49:24.420
the default ones.

01:49:26.540 --> 01:49:28.640
So this is what is type node port.

01:49:29.120 --> 01:49:30.760
Now as I talked about this doesn't

01:49:30.760 --> 01:49:32.320
have much distribution

01:49:32.320 --> 01:49:34.480
workload. You have to use the load balancer type.

01:49:34.840 --> 01:49:36.520
For this we meant the type of

01:49:36.780 --> 01:49:38.560
is your load balancer.

01:49:38.880 --> 01:49:40.200
The traffic again goes to node port.

01:49:40.640 --> 01:49:41.940
And then reaches and reaches.

01:49:42.240 --> 01:49:44.500
Are we getting this? What are these

01:49:44.500 --> 01:49:45.900
three type of services?

01:49:47.380 --> 01:49:48.420
Cluster is internal.

01:49:49.580 --> 01:49:50.860
We are talking about node port

01:49:50.860 --> 01:49:51.480
external.

01:49:53.080 --> 01:49:54.560
And then we are talking about

01:49:54.560 --> 01:49:56.060
load balancer also external.

01:49:57.160 --> 01:49:58.540
Any questions? Any questions?

01:49:59.580 --> 01:50:01.040
So what I recommend do is

01:50:01.040 --> 01:50:03.040
we have learnt a lot today.

01:50:03.580 --> 01:50:04.760
For doing this hands on

01:50:04.760 --> 01:50:06.880
services you need to understand this

01:50:06.880 --> 01:50:08.880
very clearly. So I would

01:50:08.880 --> 01:50:11.040
request you to read through what we learnt.

01:50:11.360 --> 01:50:12.540
Just for 30 minutes

01:50:12.540 --> 01:50:14.760
at your home or wherever you are.

01:50:15.460 --> 01:50:16.700
So that is easier for you.

01:50:17.620 --> 01:50:18.840
And I think we will do

01:50:18.840 --> 01:50:20.780
the laps of this and the topics tomorrow.

01:50:20.860 --> 01:50:22.340
Is that ok? Any other questions?

01:50:23.620 --> 01:50:24.860
Before we close the session

01:50:24.860 --> 01:50:26.980
today. All the

01:50:26.980 --> 01:50:28.320
hands on we will do tomorrow.

01:50:30.040 --> 01:50:30.620
So we don't

01:50:30.620 --> 01:50:33.040
if you want we can do it now. If you can't we can do it now also.

01:50:33.040 --> 01:50:34.580
For load balancer

01:50:34.580 --> 01:50:36.560
there is a demo because we cannot do it

01:50:36.560 --> 01:50:37.920
load balancer.

01:50:38.200 --> 01:50:41.300
There is a demo. I will explain how to do it.

01:50:41.880 --> 01:50:43.160
But we will talk about

01:50:43.160 --> 01:50:44.300
ingress controller later.

01:50:44.420 --> 01:50:46.320
That time I will show you like this.

01:50:46.580 --> 01:50:47.040
Because

01:50:48.320 --> 01:50:50.400
you have to use ingress controllers.

01:50:50.460 --> 01:50:52.900
We use a lot and in this we will do an ingress controller.

01:50:54.400 --> 01:50:54.900
So these

01:50:54.900 --> 01:50:55.520
are the topics.

01:51:00.740 --> 01:51:01.620
Ok.

01:51:02.080 --> 01:51:02.840
Thank you team.

01:51:03.760 --> 01:51:05.040
See you all tomorrow.

01:51:09.120 --> 01:51:09.760
Welcome.

01:51:11.320 --> 01:51:11.680
Bye bye.