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:00.000 --> 00:00:02.480
Okay, so running or gene

00:00:07.920 --> 00:00:16.080
So can you delete okay fine, can you delete your can you run the command kubectl delete

00:00:17.400 --> 00:00:18.900
Is gene correct?

00:00:19.740 --> 00:00:22.420
Gene can you delete kubectl delete

00:00:24.080 --> 00:00:25.040
pause

00:00:26.240 --> 00:00:28.060
Space hyphen f and all

00:00:30.000 --> 00:00:30.320
all

00:00:38.080 --> 00:00:46.160
Also delete kubectl delete jobs jobs. Yeah enter

00:00:47.840 --> 00:00:49.380
Cron job

00:00:50.320 --> 00:00:51.560
Yeah, no space

00:00:52.240 --> 00:00:53.800
No, no, yes. Yeah

00:00:55.920 --> 00:00:57.920
Just use upper. Yeah noise

00:00:58.840 --> 00:00:59.680
I'm not going

00:01:00.360 --> 00:01:08.480
Can you mention the name of it? Okay, delete cron job. Hello is hello. Okay fine. So now refresh the command of get pods

00:01:08.480 --> 00:01:10.540
hyphen all spaces

00:01:11.300 --> 00:01:21.080
Okay, all good fine you're good right now, uh, yes genuine and chance

00:01:24.740 --> 00:01:25.860
How to

00:01:29.160 --> 00:01:32.120
Okay, how do you log in the server is that a question

00:01:33.660 --> 00:01:34.100
Yeah

00:01:35.920 --> 00:01:36.360
Yes

00:01:37.280 --> 00:01:39.240
First log in the master master you

00:01:40.120 --> 00:01:41.960
Go to the master. Yes

00:01:41.960 --> 00:01:43.880
Is this the ip of the master?

00:01:45.580 --> 00:01:47.580
No, no, no one second one second

00:01:48.440 --> 00:01:51.840
No, that's not a master. The master is still the user

00:01:53.720 --> 00:02:00.200
233 correct master is ending with 233 chance one. I'll write you again master ip which you're using before

00:02:00.200 --> 00:02:02.960
Is uh 52

00:02:02.960 --> 00:02:05.480
In chat. Yeah confirm these three

00:02:06.880 --> 00:02:11.280
52 is uh, yeah, and you will log in this is what you used before and then maximize

00:02:11.860 --> 00:02:15.680
Type exit. Yes now run that command ssh command what you ran now

00:02:17.280 --> 00:02:19.020
You already have work of one

00:02:19.760 --> 00:02:21.820
Please understand once again once again

00:02:21.840 --> 00:02:25.360
What are you trying to do master? Yeah, I think you're right. Yeah lunch once more

00:02:26.140 --> 00:02:27.660
one once more

00:02:27.660 --> 00:02:28.400
is

00:02:29.020 --> 00:02:31.140
Hyphen pseudo su space hyphen

00:02:32.080 --> 00:02:34.500
I can see it. We're typing in

00:02:34.500 --> 00:02:40.960
pseudo space su space hyphen press enter and please type in clear. It is pseudo space su

00:02:42.080 --> 00:02:43.100
space hyphen

00:02:49.140 --> 00:02:50.160
Okay

00:02:53.420 --> 00:02:57.420
Send me once again do this al pi as

00:02:59.500 --> 00:03:00.520
a

00:03:01.100 --> 00:03:01.860
as

00:03:03.100 --> 00:03:05.180
Yeah, right as space k

00:03:06.400 --> 00:03:08.340
k k k

00:03:08.340 --> 00:03:10.320
alphabet k

00:03:10.940 --> 00:03:12.200
Let me type the command

00:03:13.100 --> 00:03:14.820
Let me type not this

00:03:14.820 --> 00:03:16.140
it is

00:03:16.140 --> 00:03:19.260
In this

00:03:28.440 --> 00:03:34.020
Equals to cdl yes in any time

00:03:34.020 --> 00:03:40.680
Any time that is uh, you've done that above command use your app add on your keyboard once more once more

00:03:40.680 --> 00:03:42.040
Yes

00:03:42.040 --> 00:03:48.040
Yeah, now let's see this. Okay. Can you do a delete cubes k delete?

00:03:50.000 --> 00:03:51.720
K delete space

00:03:52.980 --> 00:04:01.800
Bots spots space space your space is bad. Yeah hyphen hyphen hyphen hyphen hyphen hyphen two hyphens

00:04:01.800 --> 00:04:03.640
I don't see a ll l

00:04:03.640 --> 00:04:07.240
Okay enter now also do a k delete k delete

00:04:08.700 --> 00:04:09.340
K

00:04:09.340 --> 00:04:10.080
K

00:04:10.080 --> 00:04:20.920
C r o n no e remove the es after cron job give a space space space

00:04:21.820 --> 00:04:24.900
And hello. Hello h e l l o enter

00:04:24.900 --> 00:04:30.140
Enter what did you do? Okay. No problem. Let's proceed. Uh, i'm sure why is this one

00:04:30.140 --> 00:04:32.340
Let's proceed no issues

00:04:32.340 --> 00:04:33.980
Okay others

00:04:33.980 --> 00:04:39.260
Not good, okay, so I think it's better now let's the crash loop back off is not going to get shown

00:04:39.260 --> 00:04:42.340
Let's see how does work the next topic

00:04:43.180 --> 00:04:45.340
Any questions that you have a question?

00:04:49.880 --> 00:04:51.820
Let me go down

00:04:57.000 --> 00:04:58.080
So what is this

00:05:03.980 --> 00:05:04.540
What

00:05:05.520 --> 00:05:11.660
Better, okay. Okay. So what are services services simple example?

00:05:15.060 --> 00:05:19.340
It's again blocking not clear voice one second one second let

00:05:20.120 --> 00:05:23.500
Is it better now? Okay. Okay. Now yes

00:05:24.380 --> 00:05:25.300
Is good

00:05:26.500 --> 00:05:29.100
All right. So what what is the service?

00:05:30.900 --> 00:05:33.000
Why do you use services a simple example?

00:05:34.680 --> 00:05:37.600
You have answered before you in this slide

00:05:38.720 --> 00:05:40.580
What's happening in here?

00:05:42.720 --> 00:05:45.660
Okay, was the answer was the ip changes is that the reason you're right

00:05:45.660 --> 00:05:50.840
So whenever you stop and start or restart the container the pod ip changes you agree it here

00:05:50.840 --> 00:05:52.780
So we can have a static ip

00:05:54.140 --> 00:05:58.780
Instead of reaching directly the back end part the user can reach to this

00:05:59.600 --> 00:06:01.920
Static ip which the ip doesn't change

00:06:02.480 --> 00:06:04.860
And that allows to reach your back end clear

00:06:05.520 --> 00:06:09.060
So one is cluster service which were internal services

00:06:09.060 --> 00:06:13.840
It means if this wants to communicate with this it reaches the service

00:06:13.840 --> 00:06:15.880
And reaches in here

00:06:16.860 --> 00:06:20.360
And similarly if this wants to communicate this it reaches to

00:06:21.100 --> 00:06:23.240
This and reaches here. Okay

00:06:23.240 --> 00:06:28.960
So let me I think this is taking because of the problem. Let me just stop the one second

00:06:29.780 --> 00:06:32.000
It's doing a conversion of the video

00:06:33.540 --> 00:06:38.360
I think that may do later. This is reading the mode manager. Yeah, so this is a cluster service

00:06:38.960 --> 00:06:40.220
In which it takes

00:06:40.860 --> 00:06:43.680
And reaches the back end using services

00:06:44.440 --> 00:06:46.620
Was it talked about?

00:06:47.100 --> 00:06:47.920
node port

00:06:48.480 --> 00:06:51.100
In node port it is still a cluster service

00:06:51.100 --> 00:06:56.980
And it also exposes an external port like 30 000

00:06:57.700 --> 00:06:59.700
On all the nodes

00:07:03.140 --> 00:07:10.180
So any traffic comes from the public ip of this machine they say public ip

00:07:11.760 --> 00:07:16.500
Colon 30 000 public master or worker node

00:07:17.080 --> 00:07:19.240
Traffic coming here

00:07:19.240 --> 00:07:23.860
And then reaches the cluster service and then reaches in here

00:07:24.280 --> 00:07:29.720
Yeah, if you want to reach using the worker owner ip I can use public ips

00:07:30.520 --> 00:07:35.000
Same colon 30 000 it comes in here and then come in here same in here

00:07:35.880 --> 00:07:40.540
So this is normally used in your staging area for testing internally

00:07:41.260 --> 00:07:45.500
And once this is tested fine, then we go on to load balancer

00:07:46.040 --> 00:07:49.380
In which you can create a cloud load balancer

00:07:50.740 --> 00:07:58.540
Or we can also use ingress controller options and then the traffic now for example if 10 users log in

00:07:58.540 --> 00:07:59.200
the website

00:07:59.200 --> 00:08:01.620
3 would go for this 3 or 4

00:08:02.320 --> 00:08:04.460
3 and 3

00:08:04.460 --> 00:08:08.900
So it's also load balancer workload so that any service doesn't get overloaded

00:08:10.240 --> 00:08:13.860
And then it goes to the internet service same happens, but it goes

00:08:14.860 --> 00:08:18.420
Much better management of the load is good

00:08:19.100 --> 00:08:26.080
Now we will do hands-on labs now in the labs. We have the lab under application networking

00:08:27.300 --> 00:08:28.920
And the lab point

00:08:28.920 --> 00:08:34.260
I'll do some i'll do this observe

00:08:35.420 --> 00:08:38.080
And then you want to start

00:08:38.080 --> 00:08:44.040
Let me stop these let me use the existing ones. I wanted to see what the problem

00:08:47.160 --> 00:08:47.960
is

00:08:47.960 --> 00:08:49.180
I go to this

00:08:50.740 --> 00:08:53.140
And I would right click

00:09:01.020 --> 00:09:05.420
Now what is going to create so this created a pod

00:09:06.060 --> 00:09:07.360
Named backend

00:09:07.980 --> 00:09:11.060
It also create a service named backend

00:09:11.780 --> 00:09:15.200
Both having the same label which is role equal to backend

00:09:15.940 --> 00:09:18.020
So you're mapping your service

00:09:18.020 --> 00:09:20.740
And your pod with the same label names

00:09:21.380 --> 00:09:26.420
And the exposed word is what binding the service to the pod

00:09:26.420 --> 00:09:30.340
Yeah, let me show you this. So now if I say get pods

00:09:30.880 --> 00:09:32.980
I can go and buy it

00:09:35.220 --> 00:09:40.880
You see that the pod got created the backend and the pod ip is 10 44 0.2

00:09:41.880 --> 00:09:48.460
Now i'll do a get service and this service got created now which is backend

00:09:49.760 --> 00:09:52.220
Now I would do a describe

00:09:53.700 --> 00:09:57.760
Service and the name of the service now if I do this

00:09:57.760 --> 00:10:05.960
This is your static ip of your service and this is mapping your endpoint. You see endpoint 10 44 0.2

00:10:06.520 --> 00:10:09.260
So you see that is the ip of your pod

00:10:10.060 --> 00:10:17.840
So instead of me directly I can directly reach pod by doing this curl 10 44.2

00:10:17.840 --> 00:10:20.400
But this ip might change

00:10:21.100 --> 00:10:26.000
So instead of using this ip, I want to use the ip which is your static ip

00:10:26.720 --> 00:10:31.580
So now what i'm going to do is i'm going to describe i'm going to say curl

00:10:32.100 --> 00:10:35.180
I'm going to run this command 10 102

00:10:37.420 --> 00:10:38.060
126

00:10:38.820 --> 00:10:41.900
Dot one three you see i'm able to reach

00:10:43.520 --> 00:10:46.160
Did you understand

00:10:50.140 --> 00:10:50.740
Everyone

00:10:51.840 --> 00:10:59.380
So instead of reaching using a pod ip you're able to reach the backend and you can do this on all the nodes

00:10:59.980 --> 00:11:05.040
You can do the master once you do it with this observe it and try to reach

00:11:05.040 --> 00:11:11.160
The pod on all the nodes using the service will probably put your master and worker nodes and all that

00:11:12.820 --> 00:11:13.340
Yeah

00:11:13.940 --> 00:11:20.600
Start doing it now. So first do the master and then check we have to reach the ip on all the nodes

00:12:03.620 --> 00:12:05.020
You

00:12:06.300 --> 00:12:08.000
Yeah, okay one is right working

00:12:25.900 --> 00:12:29.200
What what's happening sure yeah one minute

00:12:35.040 --> 00:12:35.440
So

00:12:46.720 --> 00:12:52.880
Let's finish this so curl 10 102

00:12:58.160 --> 00:13:02.520
And then talk about 126 and 13

00:13:03.760 --> 00:13:10.740
So like this you can do on all the nodes fine, so start doing at your end

00:13:13.140 --> 00:13:13.720
Is charles

00:13:14.260 --> 00:13:17.580
Okay, so once again spelling is yes

00:13:19.180 --> 00:13:21.480
Yeah, yeah, no, no one second

00:13:22.580 --> 00:13:25.780
Remove one just have su enter set out

00:13:26.820 --> 00:13:29.900
No, why are you using worker one

00:13:31.200 --> 00:13:36.080
Yesterday configured can you go to master machine, please do a cube ctl for every node

00:13:36.080 --> 00:13:39.020
You have to write that you have to write it alias

00:13:39.020 --> 00:13:44.100
If you don't have it, you have to write it manually on every node there whenever you log off and re login

00:13:44.100 --> 00:13:49.580
You have to again write that command alias or getting it alias k equal to cube ctl

00:13:50.560 --> 00:13:52.900
Okay, can you now type in?

00:13:53.160 --> 00:13:56.700
Yeah, you already did a master before okay enter please enter get nodes

00:13:58.040 --> 00:13:59.260
K get nodes

00:14:09.860 --> 00:14:10.620
Nodes

00:14:10.620 --> 00:14:12.140
Enter

00:14:13.440 --> 00:14:16.220
So you suppose login worker three and worker four

00:14:16.340 --> 00:14:16.760
You

00:14:16.760 --> 00:14:21.300
Are we good

00:14:22.520 --> 00:14:23.000
charles

00:14:23.000 --> 00:14:26.160
I gave it two ips correct. I gave it two ips

00:14:26.160 --> 00:14:31.320
Don't log into that close the worker one piece close the worker one in the back end close it

00:14:31.320 --> 00:14:33.380
You get confused again close this click on close

00:14:34.060 --> 00:14:36.000
Yeah, click on close window

00:14:36.000 --> 00:14:41.020
Fine, so now no no now in this version now login to the worker three

00:14:41.020 --> 00:14:46.520
The ip which I gave you today, I mean I give you a copy script i'm not sure I give the ips to you in the morning

00:14:46.520 --> 00:14:50.760
Yeah, so 193 is please note down somewhere, please

00:14:50.760 --> 00:14:51.700
worker three

00:14:53.300 --> 00:14:53.740
Yeah

00:14:55.620 --> 00:14:56.980
Are we clear

00:14:56.980 --> 00:15:03.760
So in any machine if the k doesn't work, it means that you might have logged off or something

00:15:03.760 --> 00:15:10.360
You have to use alias k equal to cube ctl if not here type in the exact command cube ctl clear

00:15:10.360 --> 00:15:18.200
Fine now proceed you're good now alias k equal cube ctl yes

00:15:20.560 --> 00:15:28.520
One second on worker three one second one second. We don't use cube ctl on a worker nodes are getting it

00:15:31.120 --> 00:15:35.500
We used cube ctl only on the master because the interface is your master

00:15:36.660 --> 00:15:38.460
That's fine. You've done it. That's fine

00:15:38.460 --> 00:15:43.360
No need to worry about it, but we don't use cube ctl on your master. We use one on the worker

00:15:43.360 --> 00:15:45.160
We use one in the master clear

00:15:46.440 --> 00:15:52.700
So any work we're doing it right now the k would be on your master clear

00:15:54.300 --> 00:15:59.700
Thank you others any questions uh junbi are you good? Okay, are you understanding what's happening?

00:16:01.160 --> 00:16:02.040
now let's

00:16:02.040 --> 00:16:05.320
Proceed uh charles you're doing the lab. Okay. Are you doing the lab now?

00:16:05.320 --> 00:16:08.720
Okay, next one the continuation of the same this is your pod

00:16:08.720 --> 00:16:13.900
But in the pod we cannot scale up so we preferably want to use

00:16:13.900 --> 00:16:15.860
So before we go ahead

00:16:15.860 --> 00:16:17.940
You can also go ahead

00:16:17.940 --> 00:16:19.380
and delete

00:16:22.720 --> 00:16:23.320
the

00:16:26.540 --> 00:16:29.720
Delete your pod build a service first

00:16:31.360 --> 00:16:32.740
Delete your service

00:16:36.940 --> 00:16:40.840
Okay, delete svc in the packet

00:16:41.860 --> 00:16:46.520
It doesn't affect the existing pod it still runs, but the ip is gone

00:16:51.100 --> 00:16:55.520
So now when you try to access the same would it before

00:16:56.240 --> 00:16:59.640
It will not work because the cluster service deleted

00:16:59.640 --> 00:16:59.760
Okay

00:17:02.600 --> 00:17:02.960
Yeah

00:17:04.040 --> 00:17:06.040
So after you do this now

00:17:06.920 --> 00:17:07.880
You're good

00:17:09.000 --> 00:17:10.700
So let's go ahead

00:17:11.560 --> 00:17:14.280
The master master machine you can also delete

00:17:15.960 --> 00:17:16.800
The pods

00:17:21.240 --> 00:17:24.120
So next we are now going to do

00:17:25.040 --> 00:17:28.220
Operation using deployment now

00:17:28.220 --> 00:17:30.160
I'm going to create deployment

00:17:31.140 --> 00:17:34.780
And we're going to map the deployment to the service

00:17:36.000 --> 00:17:37.560
Okay, let me do this

00:17:37.560 --> 00:17:43.640
I wanted to observe ask questions and then do it so that you understand the concept

00:17:43.640 --> 00:17:45.500
So this is my deployment

00:17:45.500 --> 00:17:47.340
of one copy

00:17:48.660 --> 00:17:51.300
And uh, this is your application

00:17:51.300 --> 00:17:57.560
I'm going to create this i'm going to map this to my service so copy this and I go to my server

00:17:57.560 --> 00:17:59.560
I would say class

00:18:00.280 --> 00:18:03.000
Name of my deployment give any name

00:18:03.820 --> 00:18:05.420
insert mode

00:18:06.320 --> 00:18:08.680
And I would paste this

00:18:10.480 --> 00:18:11.300
Paste

00:18:12.280 --> 00:18:14.220
Okay, so it's pasted

00:18:14.220 --> 00:18:17.400
So now i'm going to run this now and say apply

00:18:19.360 --> 00:18:20.180
FNF

00:18:20.180 --> 00:18:21.900
the class step

00:18:21.900 --> 00:18:23.200
Will it get created?

00:18:24.080 --> 00:18:29.980
So say all you can also all get all it show everything what is there so it's created your deployment

00:18:29.980 --> 00:18:32.480
it's created your

00:18:33.240 --> 00:18:37.260
Replica set it has created the pod it's still doing the pod

00:18:37.260 --> 00:18:39.280
The pod has got created

00:18:41.000 --> 00:18:45.440
So now i'm going to map this pod which is 1044 0.2

00:18:46.020 --> 00:18:48.480
0.1. Okay first create this

00:18:49.520 --> 00:18:50.620
Run the deployment

00:18:51.260 --> 00:18:55.500
And observe does it create your deployment replica set and the pod?

00:19:00.740 --> 00:19:03.180
Yeah charge what you're doing have you saved the file

00:19:04.600 --> 00:19:08.700
Now you want to say cube k

00:19:09.480 --> 00:19:10.200
Apply

00:19:11.360 --> 00:19:14.400
K apply no no no

00:19:14.400 --> 00:19:15.660
Cube ctl

00:19:16.280 --> 00:19:23.660
By cube it is cube ctl or k use k you already use the word k before apply minus f plus dot yaml

00:19:25.940 --> 00:19:28.280
FNF and the file name space file name, okay

00:19:28.280 --> 00:19:33.860
I want to understand charge is your internet slow because I see others are faster uses the internet slow today

00:19:33.860 --> 00:19:39.220
I'm not sure I'm able to see other terminals getting loaded faster. Yours is very slow. I'm not sure fine

00:19:41.280 --> 00:19:43.820
Yeah plus dot yaml dot yaml

00:19:46.980 --> 00:19:49.380
dot yaml

00:19:49.380 --> 00:19:52.220
Enter yeah, now do a k

00:19:54.700 --> 00:19:57.900
Type in k space get space all

00:20:02.060 --> 00:20:03.260
All

00:20:06.780 --> 00:20:06.820
Enter

00:20:10.380 --> 00:20:11.700
Yeah, you see now

00:20:11.700 --> 00:20:17.140
You see that the pod has got created deployment is running and all you got created, okay

00:20:18.940 --> 00:20:20.820
Now i'm going to next step

00:20:21.500 --> 00:20:24.360
The next step is I want to map this deployment

00:20:25.100 --> 00:20:27.500
To a service i'm going to create a service

00:20:27.500 --> 00:20:29.620
You see here. This is a kind

00:20:30.780 --> 00:20:31.320
service

00:20:31.320 --> 00:20:33.360
Name of the service

00:20:33.940 --> 00:20:37.160
And the type is cluster ip because I want for internal

00:20:37.840 --> 00:20:40.080
And this port is for q proxy

00:20:40.800 --> 00:20:43.040
This is your port on your container

00:20:43.660 --> 00:20:45.380
So to call this tcp

00:20:45.380 --> 00:20:51.220
And your service and the pod needs to get mapped and hence you are using labels and selectors

00:20:51.220 --> 00:20:54.080
So this is going to map your service to the pod

00:20:54.760 --> 00:20:56.860
Which you created using your prompt

00:20:58.280 --> 00:21:03.200
Let's go ahead before we do this we want to delete the previous one we did so now i'll say plus

00:21:06.540 --> 00:21:08.360
svc dot yaml

00:21:09.160 --> 00:21:11.160
And i will paste this

00:21:15.600 --> 00:21:18.220
I'll bound this down

00:21:18.760 --> 00:21:24.440
k apply hyphen f and file name you can use the tab

00:21:25.160 --> 00:21:27.160
Now we'll check svc

00:21:28.760 --> 00:21:30.760
Now I do a disk file

00:21:32.920 --> 00:21:37.880
Svc and the name is nginx hyphen svc

00:21:38.360 --> 00:21:40.520
So now it says this is a service name

00:21:41.460 --> 00:21:49.420
Which namespace default this is the label in the selector the type of cluster ip single stack ip before

00:21:49.420 --> 00:21:51.340
and this is your

00:21:51.340 --> 00:21:52.500
cluster service

00:21:53.480 --> 00:21:55.420
So now let's just say

00:21:55.420 --> 00:21:58.120
curl 10 109

00:21:59.320 --> 00:22:03.780
Dot 186 whatever ip you have you go ahead and try this

00:22:07.560 --> 00:22:10.660
Do the same on all the nodes

00:22:18.240 --> 00:22:21.080
Yes next task for you all create

00:22:21.080 --> 00:22:26.320
The service and try to reach the service on all the nodes

00:22:26.320 --> 00:22:30.940
On master worker one and work it too

00:22:30.940 --> 00:22:32.320
good

00:22:32.320 --> 00:22:33.760
Then we good

00:22:35.120 --> 00:22:41.620
On all the nodes I see junv is good ck also is good. Okay, so it's working

00:22:42.240 --> 00:22:43.560
so now

00:22:43.560 --> 00:22:46.240
What we now do is we would now

00:22:47.060 --> 00:22:48.220
scale up

00:22:48.220 --> 00:22:52.080
The question for you all so now if I scale up my deployment

00:22:53.160 --> 00:22:57.040
It'll create new points. Do I need to add them manually to the service?

00:23:00.390 --> 00:23:06.410
If you create the scale up and deployment do I need to add them manually

00:23:07.250 --> 00:23:11.390
To the service what do you think so for example scale up and deployment

00:23:11.910 --> 00:23:16.310
Do I need to add them to service again or would they get added automatically?

00:23:20.290 --> 00:23:26.250
Yes, why it is because they have it they're using the same label names getting clear

00:23:27.410 --> 00:23:31.430
Since they use the same label they get mapped. So now scale up

00:23:32.230 --> 00:23:35.890
And check in the service now and you'll see that

00:23:36.850 --> 00:23:42.750
The new pods which came with these ips even they're getting mapped automatically

00:23:44.030 --> 00:23:47.710
So now first time if we hit it the traffic it'll go to this pod

00:23:48.350 --> 00:23:52.250
The second time someone hits the service static ip will go to second pod

00:23:52.250 --> 00:23:55.530
If someone hits again the same ip will go to third pod

00:23:56.170 --> 00:24:02.130
So it is also acting as your internal load balancer. Yep

00:24:02.130 --> 00:24:03.490
To next step, please

00:24:03.490 --> 00:24:04.710
scale up

00:24:06.070 --> 00:24:07.990
And try to reach

00:24:07.990 --> 00:24:12.690
You have to reach you cannot see where it's going. You can you want to check the logs of it?

00:24:12.850 --> 00:24:16.010
But you can able to see some information here

00:24:26.030 --> 00:24:26.670
Yeah

00:24:27.670 --> 00:24:28.310
Okay

00:24:28.310 --> 00:24:31.090
Are we good any questions? Yeah. Yes

00:24:31.770 --> 00:24:36.070
This is internal for example, if you have an application and database

00:24:36.890 --> 00:24:42.190
The application database is trying to communicate internally not outside. So for so

00:24:42.190 --> 00:24:45.010
But now this is this could be an application

00:24:45.910 --> 00:24:48.890
And this could be your database for example here

00:24:50.010 --> 00:24:54.730
When the applicant want to communicate with this it will go to hit this it reaches in here

00:24:56.350 --> 00:24:59.230
Yes, so now if you want to do it now we can again do it

00:24:59.230 --> 00:25:02.110
You have to create one more deployment and then you can map it

00:25:02.110 --> 00:25:05.150
So you have to create one more service if you want to we can create one more service

00:25:05.150 --> 00:25:07.370
The different application try to do it

00:25:08.050 --> 00:25:10.810
But this happening internally here. Okay now

00:25:11.710 --> 00:25:17.050
Now we'll look into node port method. So now let before that let's delete the existing ones

00:25:18.790 --> 00:25:21.530
So delete your deployment and delete your service

00:25:37.510 --> 00:25:41.230
They mentioned the deployment name or delete deploy

00:25:41.230 --> 00:25:43.030
or deployment

00:25:43.030 --> 00:25:44.350
Hyphen hyphen all

00:25:45.050 --> 00:25:46.630
And you can do a get all

00:25:46.630 --> 00:25:49.370
You'll have a default service everything is gone

00:25:49.620 --> 00:25:50.040
Okay

00:25:51.220 --> 00:25:54.820
Okay, good fine now let's do the node port now so the node port

00:25:56.140 --> 00:25:59.780
The lab 2 yeah, we will deploy again the same one

00:26:00.780 --> 00:26:01.900
same deployment

00:26:02.560 --> 00:26:06.580
And then we are going to map this to a node port in this now

00:26:07.120 --> 00:26:09.360
You see here the service

00:26:09.360 --> 00:26:10.820
Type is node port

00:26:12.160 --> 00:26:16.380
And it is you also mentioned one more node port number

00:26:17.480 --> 00:26:20.820
So this will create the cluster service first

00:26:20.820 --> 00:26:22.540
I will also map

00:26:23.060 --> 00:26:26.960
The node port on top once you do this

00:26:26.960 --> 00:26:28.600
It gives us cluster service

00:26:28.600 --> 00:26:32.540
And it also maps a node port

00:26:32.540 --> 00:26:40.560
So traffic comes first from internet it comes to port 80 to this and then reaches your cluster service and reaches your internet

00:26:40.560 --> 00:26:42.240
And you can access

00:26:42.240 --> 00:26:45.980
Public IP colon the node port number on all the boxes

00:26:46.540 --> 00:26:47.580
In the browser

00:26:48.340 --> 00:26:51.500
And you will be able to see this page. Yeah

00:26:51.500 --> 00:26:51.940
start

00:27:38.880 --> 00:27:39.280
You

00:27:39.280 --> 00:27:44.000
We can check it out you can do a curl for example do a curl a cluster service

00:27:45.140 --> 00:27:49.440
You'll be able to reach it internally, but it also creates one top

00:27:52.800 --> 00:27:59.600
Yeah, so now you can do anywhere you can do any any IP wherever you are you can play around so for example

00:28:02.120 --> 00:28:05.440
First IP is in this example. So now what I do is

00:28:06.140 --> 00:28:08.080
I would copy that IP and

00:28:08.080 --> 00:28:09.380
HTTP colon

00:28:11.100 --> 00:28:13.920
31009 do the same for all the IPs. So we see that

00:28:15.360 --> 00:28:21.280
Cluster or the service is not part of a node it across the cluster. This is what we understand

00:28:22.420 --> 00:28:24.820
You can also copy this

00:28:25.360 --> 00:28:30.140
And run it on any machine any IP you can do so you can master machine from master

00:28:30.140 --> 00:28:33.760
You can try to use a public IP of your worker one or worker two

00:28:35.460 --> 00:28:37.800
You can also do anywhere anything any IP

00:28:38.080 --> 00:28:39.000
You can also use a public IP

00:28:44.880 --> 00:28:45.700
Curl and IP

00:28:50.240 --> 00:28:51.060
That's

00:28:51.880 --> 00:28:54.360
What when you do one second charge

00:28:54.360 --> 00:28:58.580
It is curl not this IP. So do a

00:28:58.580 --> 00:28:59.120
k

00:28:59.120 --> 00:29:01.520
Get service first

00:29:01.520 --> 00:29:03.920
Type in k get svc now

00:29:04.620 --> 00:29:07.740
You have to use curl the public IP

00:29:07.740 --> 00:29:12.160
Of the master not the private IP public IP not here

00:29:12.720 --> 00:29:14.720
The one the IP which is logged in

00:29:15.820 --> 00:29:18.960
The IP using which is logged into the machine the master IP

00:29:19.820 --> 00:29:21.800
Service IP IP

00:29:21.800 --> 00:29:27.680
Public IP any public IP we can try either worker worker three or worker four any IP. No, no one second

00:29:27.680 --> 00:29:31.200
One second at a hold. Yeah, do a power do a power

00:29:32.300 --> 00:29:32.760
colon

00:29:34.080 --> 00:29:34.760
colon

00:29:35.800 --> 00:29:40.240
No, no, no same command at the end of the command

00:29:41.760 --> 00:29:45.040
Can you do the same command now, please go back to same command

00:29:46.180 --> 00:29:47.700
Use the up arrow

00:29:48.640 --> 00:29:51.760
Not this yet. Wait colon press colon

00:29:52.720 --> 00:29:56.160
The end press colon shift and colon not three one

00:29:57.100 --> 00:30:01.180
Zero zero nine one the port number you see number

00:30:01.860 --> 00:30:05.560
The number nine. Okay, press enter. Okay

00:30:05.560 --> 00:30:07.000
So what did we do?

00:30:08.140 --> 00:30:09.900
Is the IP right? Let me confirm

00:30:11.660 --> 00:30:17.580
Such as are you sure the IP is right one second. Where is your deployment really clear deployment? Okay do

00:30:18.140 --> 00:30:18.700
then

00:30:19.580 --> 00:30:23.100
It does region deployment. Correct. So write the deployment file now again

00:30:23.720 --> 00:30:25.200
Do a k get deploy

00:30:25.200 --> 00:30:27.220
Once again

00:30:27.220 --> 00:30:30.980
K get get get k get deploy

00:30:31.880 --> 00:30:32.640
k

00:30:32.640 --> 00:30:35.000
space get

00:30:35.000 --> 00:30:41.560
Paste deploy enter. Yes, so create a deployment first vi you see deployment file

00:30:42.600 --> 00:30:44.600
In your document

00:30:44.600 --> 00:30:51.500
Create that and then when the render will work clear getting it run the deployment and then do a curl

00:30:51.500 --> 00:30:54.120
The same command will work. Okay clear. Okay

00:30:54.860 --> 00:31:00.980
Others are we clear everyone you can curl to any ip. For example from the master you can put in the public app your worker one

00:31:00.980 --> 00:31:01.660
It will work

00:31:02.200 --> 00:31:08.360
From your worker two you can try to use the public app of your master according 3109 to work

00:31:08.900 --> 00:31:13.660
The cluster is completely part. It is service is part of a cluster anywhere to work

00:31:15.040 --> 00:31:20.000
Yes, so what's it now let me say that how it is coming from other node. How is it going? Is there a question?

00:31:20.000 --> 00:31:24.080
Yeah, yeah, it's because your cluster the service

00:31:25.400 --> 00:31:29.120
Doesn't belong to one node. It is part of a complete cluster getting it

00:31:30.240 --> 00:31:32.540
Your service doesn't belong to one node

00:31:33.520 --> 00:31:41.280
So it is all this is common across one any nodes of all the cluster so it reads a master

00:31:42.040 --> 00:31:46.000
Worker one worker two because the cluster the service is not part of one node. I'm getting it

00:31:47.400 --> 00:31:49.120
It's for the complete cluster

00:31:50.200 --> 00:31:55.360
And hence you'll be able to reach on all the nodes answer question. Yeah. Yeah, so are you able to reach on all the nodes?

00:31:56.340 --> 00:31:59.520
Uh, is it uh, who is speaking now? Is this ck? Okay. Okay fine

00:31:59.980 --> 00:32:02.060
So this is how we talk about

00:32:02.900 --> 00:32:08.700
Now this is used one day for testing. Why tell me we can we give public app with your customers?

00:32:09.960 --> 00:32:11.220
We cannot get it

00:32:11.900 --> 00:32:16.600
We do one day for testing and then on top of this we create a load balancer

00:32:17.320 --> 00:32:20.080
So now so how do we do for load balancer?

00:32:20.360 --> 00:32:26.500
It's a demo we cannot do it because it uh, you need to lots of work in case you want to have a load balancer

00:32:26.500 --> 00:32:28.580
Of amazon to do it

00:32:28.580 --> 00:32:29.340
into barium

00:32:29.980 --> 00:32:33.080
But I just tell the process we have to do lots of work

00:32:33.640 --> 00:32:34.900
But once you're done

00:32:35.480 --> 00:32:37.520
the syntax is this

00:32:38.180 --> 00:32:39.740
So instead of the

00:32:40.680 --> 00:32:44.760
You update this load balancer and this will create a load balancer

00:32:45.720 --> 00:32:51.320
Of amazon could be like classic load balancer or you can create application load balancer

00:32:52.400 --> 00:32:59.060
If you really want to do this with qadm or other methods then there's other method called kops method

00:32:59.640 --> 00:33:02.880
So you have to deploy your cluster using kops

00:33:03.560 --> 00:33:10.540
If you deploy using kops you can get in the load balancers and other ones you can observe it

00:33:10.540 --> 00:33:13.640
But this is very very specific to amazon

00:33:14.440 --> 00:33:15.640
And this is advanced

00:33:16.480 --> 00:33:22.400
Yeah, so you have to use kops method or or eks method you can use it

00:33:22.400 --> 00:33:22.760
Yeah

00:33:23.320 --> 00:33:29.060
So this is about uh services. We talked about water cluster service

00:33:29.060 --> 00:33:33.080
We talked about node put and we also talked about here

00:33:33.080 --> 00:33:39.680
We'll again come back to load balancing using ingress controller in the last topic. Okay, charles. Are you good? Did you create?

00:33:40.320 --> 00:33:43.340
Uh the deployment can you do a get k get deploy

00:33:44.200 --> 00:33:46.720
K get deploy, okay do ls

00:33:47.560 --> 00:33:52.160
Do ls, please. Where is your yaml file of your deployment? Can you do a cat?

00:33:52.860 --> 00:33:54.520
cat of that file

00:33:54.520 --> 00:33:58.160
cat node dot yaml yes now one second come down

00:33:59.820 --> 00:34:05.020
This is service with the deployment file deployment. Can you go to document?

00:34:05.780 --> 00:34:09.500
Okay, i'll give it which is not this is round let me one second

00:34:11.240 --> 00:34:19.740
No, one second in the chat i'm going to paste a yaml file copy that to a new file and burn it

00:34:21.860 --> 00:34:25.100
So in the chat i've pasted the yaml file

00:34:26.300 --> 00:34:28.500
Create a new yaml vi

00:34:29.100 --> 00:34:33.500
And copy that so vi give some name so you can say deploy dot yaml

00:34:35.340 --> 00:34:37.720
Deploy dot yaml

00:34:37.720 --> 00:34:38.400
Enter

00:34:40.300 --> 00:34:41.420
Yes, I

00:34:41.420 --> 00:34:46.780
Copy the yaml which is in the chat. Yeah paste it. Yes escape save this file save

00:34:48.420 --> 00:34:49.540
Apply fnf

00:34:49.540 --> 00:34:53.260
And this file name deploy just type type in your tab you can use tab

00:34:54.040 --> 00:35:00.300
Spelling is wrong. No, no, no use the tab key. You have tab tab key on your keyboard tab. Yes enter

00:35:01.540 --> 00:35:06.980
Okay, now do a k get service k get svc

00:35:08.500 --> 00:35:10.900
Enter so now what you do is

00:35:12.100 --> 00:35:13.640
Do a curl

00:35:13.640 --> 00:35:16.100
No, no curl c url

00:35:18.600 --> 00:35:19.540
Http

00:35:19.540 --> 00:35:21.280
Curl

00:35:21.280 --> 00:35:22.900
p colon

00:35:23.700 --> 00:35:28.500
Double slash and go to the public ip of your vm any vm public ip test it. Yeah

00:35:28.950 --> 00:35:34.970
Don't one second. Yeah paste it and then yeah paste it colon 31009. Are we clear?

00:35:36.730 --> 00:35:42.790
So you can do a curl of any ip or the other machines also in here or you can also copy that

00:35:43.730 --> 00:35:47.110
Yeah, do the other one do htp colon

00:35:48.390 --> 00:35:54.870
Double slash any other ip of your worker one colon 31009. Are we good?

00:35:55.690 --> 00:35:58.390
You can also copy the htp url

00:35:59.690 --> 00:36:01.750
The copy htp url the browser

00:36:02.310 --> 00:36:04.710
to your system's system browser

00:36:05.430 --> 00:36:09.770
And able to you can also see the web page. Yeah copy the htp url colon

00:36:10.310 --> 00:36:16.230
And be good. So you can do not in this you will be able to do this on all the public ips

00:36:16.870 --> 00:36:22.690
Worker one public ip worker two public ip workers all those them getting it concept

00:36:23.270 --> 00:36:29.450
Okay, thank you. Thank you. Now next topic is storage. So do you remember this lab which we did empty directory?

00:36:31.190 --> 00:36:38.210
Do you recollect empty directory in which you created a part and then you went into where lib cubelet

00:36:40.010 --> 00:36:44.590
Ports and once it deleted the part you lost the data the memory. Are we clear? Okay

00:36:44.590 --> 00:36:47.730
Do you want to once more this lab? Yeah, do it now if you're doubtful

00:36:48.490 --> 00:36:50.970
The concept not clear do it now

00:36:51.930 --> 00:36:56.010
So before we start same go ahead and delete your previous resources

00:36:57.930 --> 00:37:01.290
So delete this we see all

00:37:05.410 --> 00:37:08.650
And delete the deployment all

00:37:11.430 --> 00:37:12.290
Okay

00:37:13.930 --> 00:37:16.090
Do this yourself what I talked about it

00:37:17.920 --> 00:37:18.480
So

00:37:18.480 --> 00:37:23.020
I want you to do the lab yourself and do this next lab in your storage storage do the lab one

00:37:25.040 --> 00:37:25.600
Yeah

00:37:27.200 --> 00:37:29.340
Yes, are you able to do it the lab

00:37:30.800 --> 00:37:36.900
Yes, charles any questions under parts, yeah press enter and remove the additional for yeah

00:37:36.900 --> 00:37:42.100
Enter press one second one second do ls-ls. Yeah

00:37:42.100 --> 00:37:46.660
Space okay, you have to wait. Uh charles ls. Okay type in ls

00:37:47.540 --> 00:37:52.920
Space hyphen l and enter yeah now go to the latest one see the time now

00:37:52.920 --> 00:37:54.900
You created a part

00:37:54.900 --> 00:37:56.960
See the 558

00:37:57.860 --> 00:37:59.860
Not that one the 558

00:38:01.300 --> 00:38:03.380
Yes go inside this

00:38:05.760 --> 00:38:06.440
Cd

00:38:06.440 --> 00:38:07.840
Type in cd

00:38:07.840 --> 00:38:15.920
And just type in d just type in d a just type in d and tap not paste it tap tap tap on a keyboard

00:38:15.920 --> 00:38:21.540
Okay, okay, and then press enter. Yeah, uh typing clear. I can't see a screen typing clear

00:38:21.540 --> 00:38:24.800
Please yeah now do a ls enter cd space volumes

00:38:26.740 --> 00:38:33.040
Cd space volumes enter less wrong fine. I think you have gone to a different one. So do a cd dot dot

00:38:33.860 --> 00:38:36.020
Did you create that part charles quit

00:38:36.660 --> 00:38:42.260
Could tell me what exactly did you do before this step? Okay, do a cd dot dot one second. So now

00:38:43.840 --> 00:38:50.460
Can you run a command? Uh, let me give a command type in cube ctl. What is the pod name of yours?

00:38:50.560 --> 00:38:52.340
What the pod name it got created?

00:38:53.620 --> 00:38:54.920
Do a cube ctl get pods

00:38:55.880 --> 00:38:58.420
Do a cube ctl get pods cube ctl

00:38:59.880 --> 00:39:01.180
Get pods present

00:39:02.060 --> 00:39:02.580
Okay

00:39:03.940 --> 00:39:09.500
Okay, let me give a command you want to paste the command the chat. Okay, i'm pasting it just run that command

00:39:09.500 --> 00:39:11.660
Okay, can you copy and paste the command?

00:39:13.040 --> 00:39:14.240
Which again a chat enter

00:39:15.220 --> 00:39:18.140
Yes, so you're supposed to go into this folder clear

00:39:19.260 --> 00:39:20.300
which is

00:39:21.080 --> 00:39:21.600
Okay

00:39:22.140 --> 00:39:23.100
so now

00:39:23.740 --> 00:39:26.940
Do ls-l ls-l now go to this one

00:39:28.520 --> 00:39:33.420
Where is this one second one second, okay do ls. Uh, i'm not sure back end

00:39:34.500 --> 00:39:37.940
Did you create a pod once again once again? Give me a minute

00:39:38.480 --> 00:39:39.820
I don't see this part

00:39:39.820 --> 00:39:42.380
Where is this part? Okay. Okay. Okay. Once again

00:39:43.540 --> 00:39:45.320
Once again, you're doing a mistake

00:39:46.080 --> 00:39:46.560
Charles

00:39:47.100 --> 00:39:51.480
You're supposed to check this on the worker node where it got created

00:39:51.480 --> 00:39:56.500
Not in the master here. So can you now do a cube ctl get pods hyphen o y

00:39:57.820 --> 00:40:01.900
Again on the command cube ctl k get pods

00:40:02.740 --> 00:40:03.300
k

00:40:03.900 --> 00:40:07.180
You have a short form correct? You have k or you created before

00:40:08.020 --> 00:40:10.860
k get pods hyphen o

00:40:12.560 --> 00:40:14.620
Hyphen o space white

00:40:15.740 --> 00:40:16.300
Yes

00:40:16.300 --> 00:40:22.380
Now which one is going to go to worker four in worker four you're supposed to go to this and search the folder

00:40:22.380 --> 00:40:25.760
Are you clear? So in worker four do the same what you did?

00:40:26.320 --> 00:40:32.880
And you have the name of the folder clear. Okay others are you clear? So this is a temporary directory

00:40:34.200 --> 00:40:35.820
Okay, let's wait

00:40:36.720 --> 00:40:38.080
Yes, gene your question

00:40:39.740 --> 00:40:42.480
Yes, yeah do ls go to volumes ls

00:40:44.000 --> 00:40:49.760
No, this is wrong one the wrong one. Can you now so can you go to the master first?

00:40:51.360 --> 00:40:54.660
In the master I give it in the chat one command

00:40:54.660 --> 00:41:00.820
So can you paste that command of getting the pod id pod id your pod id is wrong. You're getting confused

00:41:00.820 --> 00:41:06.160
So can run the command in the chat and give it a command the chat run the command to get the pod id

00:41:06.160 --> 00:41:10.080
Yeah enter they're supposed to go into this folder in your worker two

00:41:11.260 --> 00:41:15.200
E4. Yeah. Yeah. So go to cd dot dot cd dot dot

00:41:16.400 --> 00:41:18.500
Once more cd dot dot is now

00:41:20.100 --> 00:41:23.520
Now do a cd and say just type e e

00:41:25.200 --> 00:41:30.000
Just type in e and tap. Yeah, then the so e4 e4 c

00:41:31.180 --> 00:41:32.320
if type

00:41:32.320 --> 00:41:35.900
Okay now

00:41:35.900 --> 00:41:36.720
Are you clear?

00:41:37.220 --> 00:41:42.240
So when you have a confusion about which part you have to get the pod id go inside it

00:41:42.240 --> 00:41:46.080
The same now volumes first one type in e type in e and tap

00:41:47.120 --> 00:41:49.620
Yeah, go inside it cd cache

00:41:51.840 --> 00:41:53.120
Do ls

00:41:53.120 --> 00:41:55.100
Yeah, now try to create a

00:41:56.060 --> 00:41:59.840
Now no files are there correct. So try to create a file

00:42:02.360 --> 00:42:04.260
Touch example dot txt

00:42:05.680 --> 00:42:12.800
Yeah, now do ls now go inside your container which is mapped and check whether you see that file

00:42:13.960 --> 00:42:19.300
In your master login to the container so which part is supposed to check you're supposed to check the path of

00:42:20.780 --> 00:42:23.300
slash h a 1 you are you so

00:42:25.040 --> 00:42:27.060
Ca ch e

00:42:27.720 --> 00:42:30.100
Ca ch e

00:42:30.100 --> 00:42:31.780
No, no ca

00:42:32.740 --> 00:42:32.960
Okay

00:42:34.080 --> 00:42:36.340
See yeah, that's it

00:42:37.440 --> 00:42:38.080
enter

00:42:38.940 --> 00:42:39.580
ls

00:42:40.180 --> 00:42:42.480
Now try to create a file in here

00:42:43.620 --> 00:42:47.300
Create a file touch file touch some file. Yeah some other name

00:42:49.100 --> 00:42:54.820
Dot txt now go to the enter now go to the worker node do ls you see this now

00:42:55.660 --> 00:42:57.220
Are we getting it?

00:42:58.580 --> 00:43:03.080
Yeah, yes. Yes, you did you did it the wrong one before

00:43:04.340 --> 00:43:08.940
So now now delete the pod and see what happens

00:43:09.960 --> 00:43:15.480
In your master come out of this you're in the container now, yes

00:43:15.480 --> 00:43:24.480
Delete the pod delete part and the part name test hyphen type wanting all that also anything. Yeah. Yeah. Yeah

00:43:24.480 --> 00:43:26.800
Yes, now go to your worker one

00:43:27.500 --> 00:43:29.320
and uh

00:43:29.320 --> 00:43:36.100
Yeah, then that's what the node worker took here. So worker two now do ls. You don't see the data clear

00:43:37.380 --> 00:43:41.540
The data lost so empty directory is running for temporary storage

00:43:41.540 --> 00:43:44.860
But delete the uh pod you will lose the storage. Yeah

00:43:44.860 --> 00:43:49.040
Because because you see when you know get pods hyphen o while

00:43:49.040 --> 00:43:53.860
This is the output of get pods hyphen o while it says which work node above that above that

00:43:54.880 --> 00:43:58.260
Above that above that above up up. Yes

00:43:58.820 --> 00:44:02.500
Yes. Yes that output is yes, you see yes

00:44:03.940 --> 00:44:04.420
No

00:44:04.420 --> 00:44:06.800
This is desired by kubernetes

00:44:06.800 --> 00:44:13.180
Thank you. Okay others. Are we good? Okay, so I want to understand i'm not including one module. Do you also work on scheduling?

00:44:14.060 --> 00:44:21.940
Would you schedule the parts yourself or done by someone else? So what a question is we have in different uh

00:44:21.940 --> 00:44:23.200
policies for scheduling

00:44:24.020 --> 00:44:29.460
Is it required or not? Do you want to learn about how to schedule different policies? Is that a use case?

00:44:29.460 --> 00:44:35.940
So for example you you can say that I want a pod to get created on a specific node

00:44:36.960 --> 00:44:40.760
Or on some other node you can write in some policies of scheduling

00:44:41.380 --> 00:44:43.200
is that

00:44:43.200 --> 00:44:44.320
You require

00:44:44.980 --> 00:44:51.540
To be learned or no. Okay. Can I use the replica set for empty directory? Is that a question?

00:44:52.600 --> 00:44:54.520
Yes. Yeah. Yeah. Yes. No, no

00:44:54.520 --> 00:44:56.980
It it does the load balancing

00:44:56.980 --> 00:45:01.900
It'll create on both the nodes. You can check it now. Let's get let me give a command

00:45:01.900 --> 00:45:06.840
Okay, so like like run a command give a small command observe it. Okay, so

00:45:08.300 --> 00:45:09.380
You can

00:45:10.560 --> 00:45:11.100
run

00:45:11.100 --> 00:45:12.820
uh deployment

00:45:14.320 --> 00:45:15.400
deployment to

00:45:15.400 --> 00:45:17.820
replicas x4

00:45:17.820 --> 00:45:19.960
And you made equal to hdpd

00:45:20.840 --> 00:45:21.380
Okay

00:45:21.380 --> 00:45:23.080
Now i'm going to get command

00:45:23.080 --> 00:45:27.240
Run this command on the master can run this command in the master. I'll show you right away

00:45:27.240 --> 00:45:32.500
Whose screen i'm seeing is it screen of uh charts? Okay

00:45:32.500 --> 00:45:36.040
Okay. Okay. So whose question is now? Uh

00:45:36.040 --> 00:45:41.480
Is it doing ck? So secret i've given a command. Can you run the command in the master?

00:45:42.600 --> 00:45:44.840
Type it clear first

00:45:44.840 --> 00:45:50.280
Please type here. I can't see a screen. Uh down so type it clear and then down the command. Yeah

00:45:51.780 --> 00:45:57.300
Okay, now you see here this is going to create four copies of image. Okay enter it now

00:45:58.680 --> 00:46:00.820
Now do a k get all

00:46:02.140 --> 00:46:06.260
Hyphen o white parts hyphen o white hyphen

00:46:08.740 --> 00:46:09.260
Oh

00:46:10.020 --> 00:46:16.160
White yeah, you see here it is created on both worker one and worker two two copies. Are we good?

00:46:16.260 --> 00:46:21.040
It's okay. So do you want to go only on one node? Is that a use case? You're good. Okay. Yeah

00:46:21.040 --> 00:46:23.140
Thank you. This is how it works by default

00:46:23.140 --> 00:46:30.720
So to understand my question your question is can I mention a specific worker node to create a part or deployment correct?

00:46:30.820 --> 00:46:31.820
Yeah, yeah, we can

00:46:32.720 --> 00:46:36.760
So we can so as a reason talking about do you want to loan those?

00:46:37.080 --> 00:46:40.360
So let me give an example of what our do does in tax

00:46:41.280 --> 00:46:43.020
So let me

00:46:43.020 --> 00:46:44.640
So we have

00:46:45.380 --> 00:46:46.800
When you go

00:46:48.020 --> 00:46:50.340
We have node name

00:46:50.340 --> 00:46:51.740
Method this is syntax

00:46:52.260 --> 00:46:57.840
You just need to replace the node name with your worker one. Okay, let me run this

00:46:57.840 --> 00:47:02.980
So question was can I create a specific node so I can do it. Yes

00:47:03.640 --> 00:47:05.240
node name

00:47:05.240 --> 00:47:07.340
dot yaml

00:47:07.340 --> 00:47:09.780
And I paste that

00:47:10.740 --> 00:47:13.280
So now this is going to get created on which node

00:47:14.100 --> 00:47:15.900
Yeah, I modify the node

00:47:15.900 --> 00:47:17.900
I'll say worker

00:47:18.680 --> 00:47:20.080
So clear

00:47:21.260 --> 00:47:27.700
I may modify the name of it. This is the name of the part going to be created on worker two

00:47:29.400 --> 00:47:34.420
And now I can say to run this

00:47:36.780 --> 00:47:42.940
If I say get pods hyphen over y it runs on worker two clear

00:47:45.550 --> 00:47:50.870
Yeah, this is syntax we can modify the worker to worker two

00:47:51.490 --> 00:47:56.410
You cannot create a master because it's tainted. I'll talk about it later if required

00:47:56.410 --> 00:48:02.810
Okay. Yeah, any other questions? Yes, Charles. Are you good? Now? Let me talk about the other types of storage

00:48:03.550 --> 00:48:06.910
Then storage we can use why you're talking about storage

00:48:06.910 --> 00:48:11.690
Outside is because if you delete the pod you lose the data

00:48:12.670 --> 00:48:18.290
And hence you might want to have in the containers or the pod data to be outside

00:48:18.810 --> 00:48:23.050
So one option is this is temporary you can have in the storage outside

00:48:24.430 --> 00:48:26.530
Temp is a temporary one

00:48:27.130 --> 00:48:32.210
You can define a specific path you can say that I want to create in that slash dmp

00:48:32.210 --> 00:48:38.990
And this is nfs one nfs. For example, let's consider that you want to have in this folder

00:48:40.110 --> 00:48:42.670
Which is outside cubanets

00:48:44.110 --> 00:48:51.790
It is not in cubanet is on the outside and this folder could be shared by both the nodes

00:48:51.790 --> 00:48:53.450
one and two

00:48:53.450 --> 00:48:55.130
And if I have a pod

00:48:56.010 --> 00:49:01.230
And if I have a pod in here both these can share in this folder

00:49:02.030 --> 00:49:06.110
Say nfs network file system for external sharing

00:49:06.830 --> 00:49:08.910
Or we can use a cloud-based method also

00:49:10.430 --> 00:49:12.230
So we talked about empty directory

00:49:13.650 --> 00:49:15.530
Which we did right now

00:49:15.530 --> 00:49:20.910
It creates in the memory when a pod is assigned to a specific nodes

00:49:21.430 --> 00:49:25.710
And when you remove the pod if you lose the data is temporary

00:49:26.430 --> 00:49:32.410
What is host path in a host path? You can mention either a directory or create

00:49:32.410 --> 00:49:35.270
Option in which it created actually on the fly

00:49:35.910 --> 00:49:38.170
Or you can mention a specific existing directory

00:49:38.870 --> 00:49:40.490
Or it can create a file

00:49:40.490 --> 00:49:42.690
or the existing ones

00:49:42.690 --> 00:49:43.670
socket

00:49:43.670 --> 00:49:46.010
Character all these would support

00:49:47.110 --> 00:49:48.230
So example

00:49:48.870 --> 00:49:50.150
This is a pod

00:49:51.030 --> 00:49:55.190
I want to get created in the path host path you see

00:49:55.950 --> 00:49:58.070
Under mnt slash html

00:49:59.350 --> 00:50:01.790
So if this path must be existing

00:50:02.710 --> 00:50:05.410
So it will go ahead and create

00:50:06.490 --> 00:50:08.350
And this will

00:50:08.350 --> 00:50:09.330
Get mapped

00:50:09.330 --> 00:50:12.190
So whatever I make changes under this

00:50:13.030 --> 00:50:17.390
Path will get updated on the host on the specific worker nodes. Yeah

00:50:17.390 --> 00:50:18.850
Let's do this now

00:50:18.850 --> 00:50:21.910
Let's do the next one host path lab

00:50:21.910 --> 00:50:24.410
Which is your lab 2

00:50:25.070 --> 00:50:26.970
So example in this

00:50:26.970 --> 00:50:28.210
I'm using

00:50:28.210 --> 00:50:29.190
a pod

00:50:29.190 --> 00:50:30.730
This is my pod name

00:50:31.450 --> 00:50:34.070
And this is the type directory or create

00:50:34.810 --> 00:50:41.630
So if this path is not there on the node where it gets created this path will get created automatically

00:50:42.250 --> 00:50:46.710
And this path is getting mapped to the container because here's the name of the volume

00:50:46.710 --> 00:50:50.310
I'm guessing the same name of the volume in my container

00:50:50.970 --> 00:50:54.330
So whatever I do in here it gets mapped to this location

00:50:55.130 --> 00:51:01.770
Even delete the pod you still have the data have it clear I can also just for same for example if you have file

00:51:03.130 --> 00:51:07.610
Or directory I can have two mount points so I can mount a file also

00:51:08.410 --> 00:51:09.890
Or directory also

00:51:10.410 --> 00:51:15.930
And I'll have two mount points if I make any change in this and this will work. Yes do the lab now everyone

00:51:16.490 --> 00:51:18.270
To do it let's get started

00:51:19.230 --> 00:51:24.370
So before we start to avoid confusion delete any existing ones

00:51:42.810 --> 00:51:46.670
From this part copy this and paste it

00:51:52.130 --> 00:51:53.290
So

00:52:00.750 --> 00:52:02.750
First we run this

00:52:05.250 --> 00:52:14.750
Reply hyphen f host part now this got created see on which node it got created

00:52:18.810 --> 00:52:25.690
So now I have to go to

00:52:25.690 --> 00:52:29.830
And see if you have the folder

00:52:31.470 --> 00:52:32.750
Create it

00:52:32.750 --> 00:52:39.750
You see a folder is there try to create a file so I can say host dot ext

00:52:41.470 --> 00:52:44.250
And now check if able to access it

00:52:44.250 --> 00:52:44.310
So

00:53:00.450 --> 00:53:03.850
See that file try to create a file in here

00:53:08.090 --> 00:53:10.170
And now you see that file in here

00:53:11.450 --> 00:53:17.790
That's it did the part and see the file still existing it will still be there because the host method

00:53:20.030 --> 00:53:27.910
So play around then come out of the container and say delete the parts

00:53:29.530 --> 00:53:34.890
And you will still be able to see the content the host

00:53:37.150 --> 00:53:38.230
So

00:53:38.230 --> 00:53:46.650
Yes, please play around it tells you need help now do a do a k get parts hyphen o wide

00:53:48.730 --> 00:53:50.730
Do a k get parts

00:53:52.090 --> 00:53:54.070
Hyphen o wide

00:53:55.930 --> 00:53:56.490
Enter

00:53:58.170 --> 00:54:00.970
You went out so type in alias

00:54:02.230 --> 00:54:08.410
Type in alias. Yeah, set the k word again from that k cubed c theta run the command again

00:54:09.230 --> 00:54:09.950
Okay

00:54:09.950 --> 00:54:10.910
You know

00:54:12.690 --> 00:54:16.710
Once again k can you do cat cat?

00:54:18.170 --> 00:54:21.770
cat uh host space host part

00:54:21.770 --> 00:54:23.550
Yeah tab tab

00:54:23.550 --> 00:54:26.070
No, no, no after host tab

00:54:26.710 --> 00:54:27.710
No space

00:54:28.230 --> 00:54:30.310
After host press the tab button

00:54:31.110 --> 00:54:33.910
On your keyboard tab, you know what the tab

00:54:34.710 --> 00:54:36.270
press it

00:54:36.270 --> 00:54:38.150
Enter. Okay. Now

00:54:39.130 --> 00:54:40.030
Apply

00:54:41.190 --> 00:54:43.590
Please apply

00:54:43.590 --> 00:54:44.830
Space

00:54:45.830 --> 00:54:47.370
Define name tab

00:54:47.910 --> 00:54:48.610
Yes

00:54:48.610 --> 00:54:51.350
Now get the parts hyphen o wide

00:54:52.830 --> 00:54:54.630
Get parts

00:54:55.350 --> 00:54:57.750
Space hyphen o wide

00:54:57.750 --> 00:55:03.350
And on which node you got created worker three so go to worker three cd

00:55:05.530 --> 00:55:06.470
cd

00:55:06.470 --> 00:55:08.570
cd forward slash

00:55:08.570 --> 00:55:10.790
var forward slash local

00:55:12.310 --> 00:55:13.250
Now var

00:55:13.990 --> 00:55:16.450
var r forward slash

00:55:16.450 --> 00:55:21.030
You can use a tab press the tab forward slash d d before

00:55:22.230 --> 00:55:25.030
uh denver denmark dd

00:55:25.820 --> 00:55:27.480
D for denmark

00:55:28.260 --> 00:55:28.820
Yeah

00:55:28.820 --> 00:55:33.660
Now d for denmark d and tab tab see data coming up. Yeah, press enter center

00:55:34.780 --> 00:55:38.940
Okay, create a file touch t o u c h touch space

00:55:40.340 --> 00:55:43.980
Host just give a name any name any name of the file dot txt

00:55:45.220 --> 00:55:51.100
H o s t yeah, something dot txt enter now go to the master login log into the pod

00:55:52.840 --> 00:55:53.960
Cubectl k

00:55:55.180 --> 00:55:58.120
K exec space exec log in the pod

00:55:58.920 --> 00:56:00.960
Log into your pod which you created

00:56:01.860 --> 00:56:03.740
exec hyphen it

00:56:04.300 --> 00:56:05.920
Can't you understand please?

00:56:06.480 --> 00:56:08.280
You know the commands your practice

00:56:08.280 --> 00:56:15.860
Exec space hyphen it and the pod name and the shell nothing your internet is low. Uh, you want to check at your end?

00:56:16.980 --> 00:56:20.300
It's very slow at your end. I give it a command in the chat can run that command

00:56:21.420 --> 00:56:25.660
Copy and paste that see you wouldn't copy it. So it's somewhere getting stuck

00:56:26.880 --> 00:56:27.400
enter

00:56:29.460 --> 00:56:35.740
Okay charge, I want to understand is your system slow is the system internet slow or only the server is slow, okay

00:56:36.540 --> 00:56:39.000
Fine now go to cd

00:56:39.000 --> 00:56:44.700
Uh, let me give you a path one second the chat will give you okay access this path. No, no, no one second

00:56:46.060 --> 00:56:49.080
Sorry, sorry, it's the spelling mistake one. Sorry

00:56:49.780 --> 00:56:54.760
Uh, so can you use apparel use apparel press apparel?

00:56:56.240 --> 00:57:05.760
Yes, now just go to the shared word use the backspace. Yeah, so spelling mistake is there you see share spelling. Yeah s h a r e

00:57:05.760 --> 00:57:06.700
a

00:57:06.700 --> 00:57:10.020
Enter and press ls. Do you see the file? What do you create?

00:57:10.620 --> 00:57:11.100
Yes

00:57:11.100 --> 00:57:13.960
Now try to create a file in here do a touch

00:57:13.960 --> 00:57:18.680
Give a file name in here touch any other file name not get some some other file name not the same

00:57:19.560 --> 00:57:21.260
dot txt enter

00:57:22.020 --> 00:57:24.760
Now go to the worker node do ls is a file

00:57:25.640 --> 00:57:26.200
here

00:57:27.040 --> 00:57:29.560
Now delete the pod go to the master

00:57:31.000 --> 00:57:33.180
And do k

00:57:33.180 --> 00:57:35.900
k space delete

00:57:37.060 --> 00:57:39.080
Space pods type in pods

00:57:40.280 --> 00:57:48.400
Space hyphen-hyphen all yes. Now, why is that going off? I think getting this kind of something. Okay, cube ctl delete. No, no, no ct

00:57:50.100 --> 00:57:50.620
l

00:57:50.620 --> 00:57:53.140
space delete

00:57:53.740 --> 00:57:54.260
Space

00:57:54.840 --> 00:57:59.840
Spots. Okay. Okay. Sorry. Sorry. Sorry. You are inside the container. Yes type and exit

00:58:00.960 --> 00:58:05.060
Sorry, sorry, you're in the container. You cannot do it type and exit. Yes

00:58:05.620 --> 00:58:07.600
Now delete the pods here

00:58:07.600 --> 00:58:08.600
Delete

00:58:10.180 --> 00:58:13.520
Space pods hyphen-hyphen all two hyphens

00:58:14.880 --> 00:58:18.660
Two hyphens. So now go back to the host now

00:58:18.660 --> 00:58:22.960
The worker node ls you see the files clear. Yeah, this is the lab clear

00:58:24.860 --> 00:58:25.380
Okay

00:58:25.960 --> 00:58:31.980
Yes team. So this is all about how you could create a host path. Are we good?

00:58:32.040 --> 00:58:34.420
Okay, do you want the second one yourself with the file?

00:58:35.300 --> 00:58:39.540
The second task in which you might mounting both a file and

00:58:41.000 --> 00:58:45.700
The folder of the lab yourself the task two same lab task two

00:58:48.560 --> 00:58:52.560
Okay, are we good you must be able to see the file getting mounted automatically

00:58:54.340 --> 00:58:56.320
Genuine ck gene

00:58:56.320 --> 00:58:59.460
Any questions? Okay. Good. That's are we good?

00:59:00.280 --> 00:59:07.000
No, no, no, so what is the example is what is the example html it is your the file path is wrong

00:59:07.000 --> 00:59:09.240
So it asked you let me know what you're trying to do

00:59:10.640 --> 00:59:12.340
So you created a share

00:59:12.340 --> 00:59:16.680
Once again, you created the master cut you have to the it's not created on

00:59:17.880 --> 00:59:18.320
worker

00:59:19.420 --> 00:59:22.600
To correct it. No, it is a it's an old one. You're not created it

00:59:24.340 --> 00:59:26.040
You're not created it

00:59:26.040 --> 00:59:29.260
Are you sure you created it? What is the name of the yaml file you gave?

00:59:29.720 --> 00:59:34.680
Can you show the yaml file of this in master run the gap do a cat of the yaml file. No, no, no

00:59:34.680 --> 00:59:37.020
Don't do like this use apparel

00:59:37.020 --> 00:59:39.160
Please use apparel

00:59:40.040 --> 00:59:42.080
Yeah, which one was it

00:59:43.300 --> 00:59:48.840
One second go up again once more up open this file. No, no go down press down arrow

00:59:51.900 --> 00:59:54.840
Okay, can you do the lab again do create a new one

00:59:56.120 --> 00:59:58.540
Can you create new one?

00:59:58.540 --> 01:00:09.080
Post path, no, no, yeah new dot yaml. Yeah

01:00:09.900 --> 01:00:10.500
Before

01:00:12.040 --> 01:00:15.020
Let's talk about the next one that task two not this

01:00:16.480 --> 01:00:17.660
You did this

01:00:18.300 --> 01:00:19.860
So escape colon

01:00:20.880 --> 01:00:28.240
You only completed this correct. Why doing again? So press escape then we'll do this escape escape code q

01:00:28.960 --> 01:00:31.420
Q no, no

01:00:31.420 --> 01:00:32.820
fine escape

01:00:33.500 --> 01:00:37.420
Colon escape. Okay. Now do a new one vim

01:00:38.620 --> 01:00:40.680
type in vim

01:00:41.800 --> 01:00:45.140
Please new type in new dot yaml. Okay enter

01:00:46.180 --> 01:00:51.020
Now when you go to the lab document when you go down you see one more yaml file is that

01:00:52.660 --> 01:00:53.300
Yes

01:00:54.900 --> 01:00:57.620
See on which node it got created

01:00:58.940 --> 01:01:02.940
See on which node the pod got created get get get is missing

01:01:11.420 --> 01:01:16.940
Okay go to work of four, yes now which path is supposed to go

01:01:19.000 --> 01:01:22.060
Which one is supposed to go check your yaml file so it's

01:01:22.200 --> 01:01:29.320
Where dot local dot data correct go to the location where local a a cd dot

01:01:30.240 --> 01:01:33.000
forward slash bar slash local

01:01:34.540 --> 01:01:38.340
Forward slash a a a

01:01:38.340 --> 01:01:38.820
after

01:01:40.280 --> 01:01:46.140
It is not local. Yeah, it is a a not d type in a

01:01:46.140 --> 01:01:52.180
Delete d type in a and tap tap press the tab key. Yes, this is the path now

01:01:52.200 --> 01:01:57.560
Press enter do ls create create a file do the same thing. You see the file

01:01:59.020 --> 01:01:59.600
Yes

01:01:59.600 --> 01:02:05.200
Okay, I think good others. Are we good? We'll continue or you need a short break. Okay

01:02:05.200 --> 01:02:09.040
I think the time right now for you is

01:02:09.540 --> 01:02:10.900
10 46 is it right?

01:02:11.560 --> 01:02:14.100
So break till 11 a.m

01:02:22.300 --> 01:02:22.940
You

01:02:45.400 --> 01:02:46.620
Hi i'm back

01:02:47.320 --> 01:02:49.320
Yes, charles. Okay, who's talking now?

01:02:50.060 --> 01:02:53.720
Is charles and whose question is it? Okay charles. Can you hear me now?

01:02:55.300 --> 01:02:59.300
Okay, what's your question? I don't understand you. Yeah, okay. What's what's your question now?

01:02:59.480 --> 01:03:03.180
What do you get? Can you show me? Okay. It means that

01:03:03.180 --> 01:03:08.160
After you create you cannot modify the field

01:03:10.540 --> 01:03:11.500
Yes, yes

01:03:11.500 --> 01:03:15.100
It'll be a new new part with a different name of the part

01:03:15.700 --> 01:03:22.840
Or you have to manually go inside and modify it you cannot modify that parameter because the part is got created

01:03:22.840 --> 01:03:24.020
Is mounted

01:03:25.120 --> 01:03:28.220
Okay others any questions. Okay, let's proceed now

01:03:30.260 --> 01:03:32.400
Now continuing the same storage

01:03:33.020 --> 01:03:37.320
We have the next one which is called a storage class or storage profile

01:03:38.220 --> 01:03:41.800
Let me talk. What is this? So what is storage class or?

01:03:42.180 --> 01:03:43.960
What is called as storage?

01:03:43.960 --> 01:03:44.880
profile

01:03:44.880 --> 01:03:47.120
sorry class no profile so now

01:03:47.880 --> 01:03:54.600
You work on uh, so we work on different environments. So you work on dev in enterprises you work on test

01:03:55.480 --> 01:03:57.360
You work on production

01:03:58.520 --> 01:04:00.520
You also would be

01:04:01.200 --> 01:04:04.480
Requiring for archiving archiving long-term storage

01:04:05.300 --> 01:04:07.660
And enterprises we use ssd

01:04:07.660 --> 01:04:09.660
Ssd hdd

01:04:10.800 --> 01:04:17.040
And magnetic so which one is faster among this ssd which one is faster which disc is faster among these

01:04:18.920 --> 01:04:25.240
Is ssd faster hd faster this one is faster this is faster this is the first one

01:04:25.240 --> 01:04:26.760
This is the second

01:04:27.420 --> 01:04:28.260
and third

01:04:28.260 --> 01:04:29.720
Which is costlier?

01:04:31.140 --> 01:04:33.020
This is costly this

01:04:33.020 --> 01:04:36.460
So now which one would I use for prod?

01:04:37.660 --> 01:04:42.180
For live, which this could be good good clear for test workloads and dev

01:04:42.180 --> 01:04:45.600
Can we use this and for long term we can use archive

01:04:46.220 --> 01:04:48.900
Is the diagram making sense good? So

01:04:49.660 --> 01:04:56.780
In your kubernetes, we have to create a storage class or profile for each of these

01:04:57.580 --> 01:05:02.780
So what does the backend storage team does so they will create a storage class

01:05:04.020 --> 01:05:04.700
kind

01:05:05.580 --> 01:05:10.060
Storage class and they mentioned the type

01:05:10.780 --> 01:05:12.560
Like ssd

01:05:13.660 --> 01:05:17.660
And they say size could be 100 gb

01:05:19.580 --> 01:05:26.380
So they create something like this for ssd they create something like this for hdd

01:05:27.220 --> 01:05:30.060
So say that size is 100 gb

01:05:31.260 --> 01:05:37.180
So these are called as storage class of profiles, so we again have one more kind this is what they do

01:05:37.180 --> 01:05:41.280
After this is done what they do is the storage team

01:05:41.900 --> 01:05:48.680
This they make it to small portions. So they convert this to something like a persistent volumes

01:05:48.680 --> 01:05:50.880
so persistent

01:05:50.880 --> 01:05:53.020
Volumes will be one

01:05:53.020 --> 01:05:56.540
This will 25 gb. So they create like this

01:05:57.080 --> 01:05:59.540
four parts four components

01:06:00.540 --> 01:06:03.920
25 25 25 which makes 100

01:06:05.000 --> 01:06:10.820
Are we clear what is persistent volume? So we have how many persistent volumes now how many persistent what did we have right now?

01:06:11.680 --> 01:06:16.200
As a diagram four, so this is what they do similarly for this also they create

01:06:16.200 --> 01:06:18.540
multiple persistent volumes

01:06:19.840 --> 01:06:22.160
One two three and four

01:06:22.900 --> 01:06:29.280
So persistent volumes are partitioning or splitting up your disk

01:06:30.100 --> 01:06:36.740
Into different logical volumes. So this is also called as logical volumes. Okay, so this is done by

01:06:37.340 --> 01:06:42.060
The storage team this is this is all done by storage team. We're working on Kubernetes

01:06:42.060 --> 01:06:47.600
They create a storage class for different different type of storage and they create the logical volumes

01:06:48.260 --> 01:06:54.580
Yeah, now what is next now? Let's consider that you belongs to a devops team

01:06:55.520 --> 01:06:57.500
You are a devops team

01:06:58.620 --> 01:07:00.860
And you want to use that storage

01:07:01.420 --> 01:07:04.620
So we have a storage create in the backend and you want to use that

01:07:05.900 --> 01:07:07.020
so your

01:07:07.940 --> 01:07:08.500
sme

01:07:08.500 --> 01:07:11.120
Or could be your team lead

01:07:12.020 --> 01:07:13.540
Of your team

01:07:14.280 --> 01:07:18.300
They would create something called as persistent

01:07:20.120 --> 01:07:20.680
Volume

01:07:21.520 --> 01:07:22.080
claim

01:07:22.680 --> 01:07:26.800
They create a claim for the team and then they say that

01:07:27.980 --> 01:07:30.220
Give us 50 gb

01:07:30.800 --> 01:07:32.880
So they have to create a kind

01:07:33.580 --> 01:07:37.120
Person volume claim and they say that I want 50 gb

01:07:37.120 --> 01:07:41.980
So this 50 gb is within the team now you are an analyst a developer

01:07:42.600 --> 01:07:47.760
And when you create a pod a kind a pod you would refer this

01:07:47.760 --> 01:07:53.600
So this will be like pbc1 for example, you would refer that pbc name inside your pod

01:07:54.240 --> 01:07:57.980
So this pod requires like 1 gb it is taken from in here

01:07:58.560 --> 01:08:04.420
So like this we can create multiple pods or deployments and the storage comes from this storage

01:08:05.160 --> 01:08:10.240
So now your team lead can understand how much you are using it

01:08:11.080 --> 01:08:15.220
So you're following a process to ask for the storage

01:08:15.740 --> 01:08:16.360
similarly

01:08:17.120 --> 01:08:21.780
The backend team the storage team they can see who which team asked for the storage

01:08:22.420 --> 01:08:26.100
So this is a good process to manage storage

01:08:26.100 --> 01:08:31.500
And accountable so tomorrow if someone needs to know which team used the storage

01:08:32.100 --> 01:08:38.360
How much the cost all this could be done by using this process you understand the process everyone. Yeah, I repeat

01:08:38.360 --> 01:08:45.180
So storage team would create what what all things they do they create the storage profile

01:08:47.040 --> 01:08:48.440
And then

01:08:48.440 --> 01:08:50.480
They create the pb

01:08:51.120 --> 01:08:52.540
The devops team

01:08:53.800 --> 01:09:01.060
Would create a pbc and the analyst would start using that in the pods or deployments

01:09:02.800 --> 01:09:04.540
This is what story class

01:09:04.540 --> 01:09:12.240
Yeah, or the profile talking about it. The story class provides a way for administrators to describe the classes of story they offer

01:09:12.960 --> 01:09:15.040
And this is based on different type of

01:09:16.100 --> 01:09:18.420
service levels speed

01:09:18.420 --> 01:09:20.260
Discover profiles

01:09:21.840 --> 01:09:23.200
So example

01:09:24.340 --> 01:09:30.660
Type dp2 in amazon gp2 is a type of ssd. So we have in amazon we use gp2

01:09:31.440 --> 01:09:33.260
We use io1

01:09:34.020 --> 01:09:36.020
Or we can use sd1

01:09:37.420 --> 01:09:43.200
Or we can use sc1. These are different types of what we have. So these two use hdd

01:09:43.940 --> 01:09:46.360
And these two use ssd

01:09:46.360 --> 01:09:50.840
Yeah, i'll talk about these later as of now just think about what we'll talk about all the things that it is

01:09:51.520 --> 01:09:52.780
We'll come back to it later

01:09:53.320 --> 01:09:55.800
So in a pb, they create something like this

01:09:57.820 --> 01:09:59.880
And after this is done

01:10:00.880 --> 01:10:05.080
Yeah question, okay after this is done you see this is your pb method

01:10:06.300 --> 01:10:06.780
Name

01:10:06.780 --> 01:10:12.120
This could be a local don't mention local local means is going to take the storage of your cubanis

01:10:12.120 --> 01:10:17.900
Cluster and the path and if you want to have in the storage to be accessed by all the nodes

01:10:18.800 --> 01:10:20.900
Post path provides you one in the same node

01:10:20.900 --> 01:10:25.740
So we can also use an nfs. So nfs means external storage

01:10:25.740 --> 01:10:27.560
Which is on this server?

01:10:28.460 --> 01:10:32.680
It could be used by multiple ports running on different nodes as we mentioned

01:10:33.660 --> 01:10:34.700
And a claim

01:10:35.240 --> 01:10:37.780
You mentioned the claim how much you want in the backend?

01:10:38.580 --> 01:10:40.240
And this will be used by the team

01:10:40.240 --> 01:10:48.580
That is your pbc for doing the pbc either you can a static method or dynamic method so in a static method

01:10:49.120 --> 01:10:51.320
All this must be done

01:10:51.320 --> 01:10:54.300
So static method all this must be done

01:10:54.300 --> 01:10:59.380
But this sometimes could be slow because the team

01:10:59.380 --> 01:11:01.760
Needs to create a pb manually

01:11:02.780 --> 01:11:06.580
And then the pbc all these things this is slow

01:11:07.360 --> 01:11:07.980
so

01:11:07.980 --> 01:11:10.760
This is where this is the method is called as static

01:11:11.900 --> 01:11:14.940
Now in the dynamic method we could quick do quickly

01:11:15.500 --> 01:11:16.400
wherein

01:11:17.560 --> 01:11:23.900
The type of the storage class which for dynamic must be something called

01:11:24.520 --> 01:11:25.060
immediate

01:11:25.820 --> 01:11:33.900
So when you have any storage class with this words like immediate or it could be wait for first

01:11:35.120 --> 01:11:37.440
Customer it'll have in some parameters like this

01:11:37.980 --> 01:11:43.620
So when you see something like this, it means that this is a dynamic storage class

01:11:43.620 --> 01:11:50.220
Yeah, so what exactly we mean by that so dynamic storage class if your storage profile is dynamic

01:11:50.920 --> 01:11:58.960
You can directly go ahead and create something like that. Let me show a small example. You need not create a pb

01:11:59.520 --> 01:12:02.140
You need not create a pbc

01:12:02.140 --> 01:12:06.060
So directly you would go ahead and mention in your pod

01:12:07.100 --> 01:12:08.340
or deployment

01:12:08.340 --> 01:12:09.920
directly a template

01:12:10.700 --> 01:12:11.680
like this

01:12:12.400 --> 01:12:16.460
So this will automatically create a pbc in the back end

01:12:17.220 --> 01:12:19.540
It will create a pb in the back end

01:12:19.540 --> 01:12:25.260
Automatically, we need not go ahead and create a pb pbc all these things manually

01:12:26.300 --> 01:12:28.600
So it creates your pbc

01:12:28.600 --> 01:12:32.780
And creates your pb all these things automatically in the back end

01:12:33.320 --> 01:12:35.180
That is called as dynamic

01:12:35.180 --> 01:12:41.680
So dynamic you need not create a pbc and pb just refer the template in your pod or in your deployment

01:12:41.680 --> 01:12:43.760
And that will get created automatically

01:12:44.380 --> 01:12:46.000
That is called as dynamic

01:12:46.000 --> 01:12:47.360
Why do you want dynamic?

01:12:49.060 --> 01:12:51.320
Because of the challenges of the manual

01:12:53.300 --> 01:12:57.840
And the same in here i referred that also so there must be a storage class

01:12:57.840 --> 01:12:59.900
With need to support a dynamic

01:13:00.440 --> 01:13:06.840
And then you can refer that template in your pod or or your deployment and that will take in the resources

01:13:07.540 --> 01:13:09.440
So for example if it is in cloud

01:13:09.440 --> 01:13:15.000
Or very fast then you could practice to use dynamic again when using this we can define some modes

01:13:15.000 --> 01:13:17.980
So you can say access it only by one node

01:13:17.980 --> 01:13:26.200
Multiple nodes and what happens so example your sme created a pbc for example, and if you delete the pod

01:13:26.200 --> 01:13:31.980
For example, you had a pod created and later you delete all the pods. So the pbc is something you have

01:13:31.980 --> 01:13:34.940
so either you can give this claim back to

01:13:36.660 --> 01:13:37.300
the

01:13:37.300 --> 01:13:40.680
The storage team or you can use it for other project

01:13:40.680 --> 01:13:42.360
So retain means

01:13:42.940 --> 01:13:47.140
If you have the claim still you can use it for a different project

01:13:47.140 --> 01:13:50.500
You need not again ask the storage team give me that storage

01:13:51.140 --> 01:13:55.000
Delete means it will delete the pbc the story from your team

01:13:55.000 --> 01:14:00.220
It will go back to the storage team and the storage team can use it for different other purpose

01:14:01.020 --> 01:14:07.240
So if you don't mention the type it's retained by default delete is something which you need to explicitly mention that

01:14:07.240 --> 01:14:08.460
in your type

01:14:09.140 --> 01:14:13.680
So in here the default is reclaim the testing so

01:14:13.680 --> 01:14:17.120
Very brief, I hope you understood now what the story class we talked about

01:14:17.760 --> 01:14:19.700
Or also called storage profiles

01:14:20.320 --> 01:14:26.020
How do you create it looks something like this if you see a word immediate or wait for first customer

01:14:26.020 --> 01:14:28.260
it means it is

01:14:28.260 --> 01:14:30.760
Dynamic if you don't see these are static methods

01:14:30.760 --> 01:14:35.120
They can mention reclaim policy for the pbc to retain or delete it

01:14:35.120 --> 01:14:39.440
and you can also mention the type and you can also mention the

01:14:40.260 --> 01:14:41.680
permissions the dynamic

01:14:42.300 --> 01:14:44.200
Or it could be your static

01:14:44.200 --> 01:14:46.660
This is your pb

01:14:48.320 --> 01:14:52.960
Any questions, so I want you to see some live examples, let's see this

01:14:54.540 --> 01:15:01.400
See this link how does it look so you can see this link and observe all these information

01:15:02.320 --> 01:15:03.740
Then go down

01:15:04.340 --> 01:15:11.380
How do you create all these examples claim precision volume storage class not looking for search for storage class

01:15:11.380 --> 01:15:13.920
the right side left side

01:15:14.840 --> 01:15:19.220
Whatever you want to search it you'll get some documentation that you need to mention provisioner

01:15:20.020 --> 01:15:23.960
Parameters and their rank reclaim quality storage class is one more example

01:15:24.500 --> 01:15:29.060
Okay, is this static or dynamic this word class dynamic or static testing?

01:15:30.700 --> 01:15:31.820
Please answer

01:15:32.500 --> 01:15:37.140
Is static or dynamic you mention chat also the chat piece who wants to try this

01:15:38.080 --> 01:15:42.280
Charles gene is a static or dynamic dynamic. How do you say that? Yeah, you're right

01:15:42.740 --> 01:15:44.940
It is this one. You see this

01:15:44.940 --> 01:15:51.220
Wait for first consumer or immediate if you see it. It is a dynamic. Are you clear? Yes

01:15:51.860 --> 01:15:56.680
That's wonderful. So this is an example about retain it means that

01:15:57.580 --> 01:15:58.460
If you

01:15:58.460 --> 01:16:03.260
It'll go back to it will be still with your team. So this is what we're writing a story class example

01:16:03.260 --> 01:16:05.040
So you can mention could be a cloud

01:16:06.660 --> 01:16:11.180
Or could be a local local means going to use your storage of your cluster

01:16:11.900 --> 01:16:14.160
If you use nfs, for example

01:16:15.500 --> 01:16:21.640
We have to refer again the nfs shares a different type so to create again a surface for that class

01:16:21.640 --> 01:16:25.200
So for each and every type we create so that

01:16:25.940 --> 01:16:27.640
Example you work on vmware

01:16:27.640 --> 01:16:32.040
And you want to get your cubanets then you use your vSphere

01:16:32.560 --> 01:16:34.240
You create a separate storage class

01:16:35.040 --> 01:16:40.880
For the vSphere which will work for a vmware. Yeah, so this would be a static because don't say the word

01:16:42.860 --> 01:16:43.360
of

01:16:44.160 --> 01:16:50.460
Dynamic or wait for don't see this. This is your static like this you can create for every storage

01:16:51.480 --> 01:16:54.160
All these are in classes, this is your dynamic

01:16:55.140 --> 01:17:00.920
Okay, are we good? Okay. So now let's do uh, and so on

01:17:01.760 --> 01:17:02.260
access

01:17:03.480 --> 01:17:07.080
Model lab three so we're going to do a small example of a local

01:17:07.080 --> 01:17:09.060
See in cubeadm

01:17:09.060 --> 01:17:15.860
You you don't have any storage class. You have to install plugins and other ones. We're going to use a local one right now

01:17:16.800 --> 01:17:22.980
So we're going to create a 10 gigabit and we'll see the information by doing describe and get then we create a pbc

01:17:23.660 --> 01:17:26.900
Or the size you what you want let's tactic. There's a small challenge

01:17:26.900 --> 01:17:31.460
For example, you had 10 gigabit, but you asked for one it'll give you the complete storage

01:17:31.460 --> 01:17:33.640
The challenge is there in your tactic

01:17:34.320 --> 01:17:37.880
To give a complete one that at least we'll try to see how you can do it

01:17:37.880 --> 01:17:44.260
Then we will create a pod and in the pod we refer this pbc name. So refer the claim name as

01:17:45.060 --> 01:17:48.980
My claim one or for what i've given in here. I think we're given here my claim one

01:17:50.820 --> 01:17:52.980
Sorry, this is your one, okay

01:17:54.600 --> 01:17:55.560
I create

01:17:56.420 --> 01:17:58.100
And it will use the storage

01:17:58.100 --> 01:17:59.620
from your pbc

01:18:00.300 --> 01:18:05.580
And this will get mapped to the back end in your host path, which you get the first one the first one the lab

01:18:06.180 --> 01:18:09.100
In here it will map it to work. This is on the host

01:18:09.700 --> 01:18:12.160
And this is getting mapped onto the container

01:18:12.720 --> 01:18:14.260
in this location

01:18:14.940 --> 01:18:18.660
Let's say go ahead and create a pod and see which node got created

01:18:19.160 --> 01:18:21.480
And you still see the data persisted

01:18:22.280 --> 01:18:26.160
So your pb is mapped using the host path method. Okay

01:18:26.160 --> 01:18:30.580
Let's start before we get started delete the previous one so that you don't get confused

01:18:32.820 --> 01:18:35.440
Go to the master

01:18:37.760 --> 01:18:38.980
Delete the pod

01:18:41.680 --> 01:18:43.560
And then start the lab

01:18:44.320 --> 01:18:46.760
So first create a pb

01:18:46.760 --> 01:18:51.440
Do it get describe observe and then the next step

01:18:52.580 --> 01:18:53.940
So copy this now

01:18:56.160 --> 01:19:00.860
And then at the vipv any name you can give at pb dot yamen

01:19:01.860 --> 01:19:04.480
And right click paste

01:19:06.700 --> 01:19:07.560
Paste

01:19:08.560 --> 01:19:09.040
Here

01:19:11.100 --> 01:19:18.100
And save this and now apply at next pv dot yamen

01:19:18.210 --> 01:19:18.690
Okay

01:19:23.610 --> 01:19:28.310
Is it done what is not okay, let me check your screen and type it clear type clear

01:19:30.070 --> 01:19:30.630
Yeah

01:19:31.670 --> 01:19:34.250
Okay, which yaml file is this

01:19:34.250 --> 01:19:35.930
Can you show the yaml file of this?

01:19:36.230 --> 01:19:39.630
I think because of the syntax one second the small error

01:19:39.630 --> 01:19:43.750
I can delete this so syntax is wrong. I think some confusion one second

01:19:43.750 --> 01:19:46.630
Let me give you the updated one bigger syntax give me a minute

01:19:46.630 --> 01:19:51.650
Can we replace that yaml with this replace the yaml with this small?

01:19:52.170 --> 01:19:56.550
Change and now try to use this yaml file delete or create a new one

01:19:57.290 --> 01:19:58.270
and confirm

01:20:14.390 --> 01:20:14.530
You

01:20:32.350 --> 01:20:34.270
Again elements like this

01:20:47.610 --> 01:20:48.250
Okay

01:20:48.250 --> 01:20:49.170
Getting error

01:20:54.550 --> 01:20:57.430
Give a different name for pb already had one

01:21:00.790 --> 01:21:04.950
Okay modify I think already had the previous one so give pb2

01:21:07.450 --> 01:21:09.950
What do you have that

01:21:10.990 --> 01:21:17.790
Already had one before okay, I think you can use the existing one also I didn't want them all before does it work

01:21:19.030 --> 01:21:21.710
Yeah, good the one which I gave you now it is working

01:21:23.630 --> 01:21:25.490
Is dean are you able to create

01:21:26.670 --> 01:21:32.010
Now one second, uh, can you tell me what you're trying to do now? Yeah. Okay for which for which one?

01:21:32.950 --> 01:21:37.670
Yeah, you can what he can use it try to try to apply define fine. Okay done

01:21:37.670 --> 01:21:43.830
Do yeah next command do get pb do okay typing clear right here

01:21:45.290 --> 01:21:47.630
K get pb

01:21:47.630 --> 01:21:51.310
Do you want to apply it apply it again enter? Yeah

01:21:51.310 --> 01:21:56.390
Do okay get pb. Yeah good. Okay for the next step now the next step any question you have

01:21:56.390 --> 01:21:58.390
Yeah, the next step now what you do is

01:21:59.490 --> 01:22:00.610
Go ahead

01:22:01.950 --> 01:22:02.510
and

01:22:02.510 --> 01:22:04.910
create a pbc

01:22:06.050 --> 01:22:06.610
Okay

01:22:10.030 --> 01:22:10.590
Fine

01:22:14.150 --> 01:22:18.070
So we have a pbc dot yaml

01:22:19.590 --> 01:22:24.610
Let's set more and paste that yaml file. We mentioned volume name. I'm using pb2

01:22:24.610 --> 01:22:28.730
So i'm just trying to i'll modify that my end you can use pb1 itself

01:22:31.130 --> 01:22:31.730
And

01:22:31.730 --> 01:22:38.270
I paste it in here so my you can modify the volume for example make it two minus two viewers one play around

01:22:39.450 --> 01:22:40.650
and create

01:22:45.910 --> 01:22:47.110
A pbc

01:22:53.450 --> 01:22:56.090
Yes, is it bound that you've got bound

01:22:57.610 --> 01:23:03.510
So you see a pbc now it's bound you can again do get pb you can see that which claim is using it

01:23:05.510 --> 01:23:07.450
Do a get pbc

01:23:07.450 --> 01:23:14.710
After creative apply the pbc do a get pbc also do a get pb and you can see so now the storage team can see

01:23:15.370 --> 01:23:17.190
Which claim is using it?

01:23:19.210 --> 01:23:20.110
Are we clear

01:23:21.230 --> 01:23:28.510
Okay, good so now do a get pb, okay good so now let's create a pod and we'll use the claim in the pod

01:23:30.930 --> 01:23:39.070
Next step is go down create a pod and you're referring the claim name create a pod

01:23:44.830 --> 01:23:47.610
Dot yaml insert mode

01:23:48.710 --> 01:23:51.950
And you paste it

01:23:59.130 --> 01:24:01.130
Now you want to save this

01:24:04.590 --> 01:24:10.970
Apply fnf pod pbc dot yaml so the pod you've got created

01:24:14.090 --> 01:24:15.050
Yeah

01:24:15.610 --> 01:24:21.930
After the pod got created do a describe pod and see whether do you see the details of the volume

01:24:21.930 --> 01:24:23.630
Okay, you can do one more step

01:24:24.490 --> 01:24:26.070
Do a describe

01:24:27.010 --> 01:24:27.650
Pod

01:24:28.410 --> 01:24:30.470
And give the pod name

01:24:30.470 --> 01:24:34.710
Just to confirm it is properly created with the volume

01:24:35.810 --> 01:24:39.290
And when you see this in describe pod you see this

01:24:40.170 --> 01:24:43.770
This is what talking about you see it is using your

01:24:43.890 --> 01:24:46.370
Pb claim you see this everyone

01:24:49.090 --> 01:24:49.770
Confirmed

01:24:49.770 --> 01:24:55.250
After I create the pbs this is so it means that this pod is using this pb

01:24:56.570 --> 01:24:58.490
That is very confirmed

01:24:59.210 --> 01:25:06.810
Yeah, so now go ahead and check the mapping so the pod what you created the container

01:25:07.490 --> 01:25:10.050
It would have got mapped with which location?

01:25:10.610 --> 01:25:14.730
For this one the starting one which you created tmp data 01

01:25:15.410 --> 01:25:18.450
So see on which node it got created

01:25:18.450 --> 01:25:24.210
Go to that location for this this one and see the mapping to the container. So now what you do is

01:25:25.430 --> 01:25:28.450
You're going to work it too for me. So i'll go to work it too

01:25:30.650 --> 01:25:33.910
And I go to cd tmp

01:25:35.530 --> 01:25:36.610
The folder

01:25:37.730 --> 01:25:41.170
So this is what is getting mapped so i'll now create a file

01:25:42.770 --> 01:25:48.450
See on which node got created and go to the location where the tmp data 01

01:25:48.450 --> 01:25:53.210
Which you see under the path in the first yaml file try to create a file

01:25:53.210 --> 01:25:56.270
And check if we're able to map it to the container

01:25:56.270 --> 01:26:00.310
Which is under user share engine x html

01:26:00.310 --> 01:26:02.650
Yep now go to master

01:26:13.230 --> 01:26:14.230
So

01:26:14.230 --> 01:26:33.030
So that's fine now create a file and say container dot txt

01:26:34.870 --> 01:26:41.670
And now you go to the worker node you do ls you see the path is coming in

01:26:45.250 --> 01:26:46.250
Are we good

01:26:47.250 --> 01:26:47.790
everyone

01:26:48.750 --> 01:26:50.390
Junvi ck charles

01:26:50.390 --> 01:26:55.110
Okay, okay same delete the pod and see it will be there because we're talking about host path

01:26:55.110 --> 01:26:57.670
So this is a simple example of how we can use

01:26:58.350 --> 01:26:59.430
static volumes

01:27:00.230 --> 01:27:05.410
And the storage it is using is within your cluster you say content still there, okay

01:27:05.410 --> 01:27:07.230
so this is

01:27:07.230 --> 01:27:08.570
all about

01:27:08.570 --> 01:27:15.390
Your storage and we'll talk about tv pbc and these once you're done delete the pod

01:27:31.550 --> 01:27:33.390
In the pbc

01:27:36.570 --> 01:27:39.330
And delete the pb

01:27:41.710 --> 01:27:47.270
Next one, so as of now do you work on microservices

01:27:48.530 --> 01:27:53.670
Do you work on microservices or containers in your products are you working on these

01:27:53.670 --> 01:27:57.550
In your projects, okay. Have you heard about this 12 factor?

01:27:58.330 --> 01:28:00.390
I've heard about this

01:28:00.390 --> 01:28:05.010
Let me explain the 12 factor app is the framework

01:28:06.030 --> 01:28:12.010
So when you work with containers and kubernetes or any developers for example

01:28:12.010 --> 01:28:14.450
Or application we use some frameworks

01:28:14.450 --> 01:28:20.130
So 12 factor app is a framework which you want to use when you work with microservices

01:28:21.250 --> 01:28:26.470
Let's understand what they say first one they say is use declarative formats

01:28:26.470 --> 01:28:34.190
It means you always write in like a code like a yaml. Do not just use imperative method not a command line

01:28:35.030 --> 01:28:36.670
So that it is reusable

01:28:37.430 --> 01:28:39.910
Second one have a clean contract

01:28:40.550 --> 01:28:44.110
It means that whatever you create applications

01:28:44.710 --> 01:28:48.870
It must be runnable on any operating system in the future third one

01:28:49.910 --> 01:28:55.590
Whatever you create right now on premises it must also run on the cloud tomorrow

01:28:55.590 --> 01:28:59.850
So you have to carefully plan that if you're doing some work on on premises

01:28:59.850 --> 01:29:03.550
The same what you do must also be runnable on your cloud

01:29:05.310 --> 01:29:06.150
Fourth one

01:29:06.150 --> 01:29:13.930
When you work on different environments, there has been very minimal changes. For example, if i'm using a yaml in my dev environment

01:29:14.710 --> 01:29:20.890
If I want to create a test environment I must not make much changes in my configurations

01:29:21.710 --> 01:29:24.150
I'm talking the template talking about using templates

01:29:24.650 --> 01:29:28.170
And anytime you must be able to work scale up your workloads

01:29:29.130 --> 01:29:33.070
Yeah, so now this is what we are doing it right now. We are doing it declarative

01:29:33.590 --> 01:29:35.430
We are following clean contract

01:29:35.430 --> 01:29:38.290
We are doing all these in your kubernetes

01:29:39.510 --> 01:29:45.670
And apart from these they also say that you want to code base. It means starting in version control like github

01:29:46.850 --> 01:29:47.890
dependencies configurations

01:29:47.890 --> 01:29:49.790
Now let's go to config

01:29:50.430 --> 01:29:52.970
And see what is this

01:29:53.490 --> 01:29:55.350
So under config what they say

01:29:55.890 --> 01:30:00.790
Do not mention the configurations in the same file where you have the code

01:30:01.590 --> 01:30:03.750
So what do they mean by this?

01:30:04.470 --> 01:30:07.590
So for example tomorrow you want to create a mysql

01:30:08.830 --> 01:30:12.190
Give an example. Let's say you want to create a mysql pod

01:30:12.950 --> 01:30:15.590
You want to create a mysql

01:30:15.590 --> 01:30:16.050
pod

01:30:16.610 --> 01:30:20.770
So for mysql you might want to have in the information of

01:30:21.730 --> 01:30:22.410
username

01:30:23.670 --> 01:30:24.350
Password

01:30:25.590 --> 01:30:28.050
And could be some urls

01:30:29.290 --> 01:30:29.970
of

01:30:29.970 --> 01:30:35.990
Database you do not want to put it in the main type called as a pod

01:30:36.870 --> 01:30:38.650
Don't put this information this file

01:30:39.350 --> 01:30:45.850
You want to put this information of username for example in a kind called as config map

01:30:46.870 --> 01:30:48.810
So you put this

01:30:48.810 --> 01:30:54.590
Username and urs in this and then once you log into the pod you can get the information

01:30:55.510 --> 01:30:56.610
So we're separating

01:30:56.610 --> 01:31:01.830
Your configurations usernames passwords from the main file

01:31:02.610 --> 01:31:04.510
That's what i'm talking about here

01:31:05.990 --> 01:31:12.410
So now saying this will let us look into config maps. So config map is what is going to provide you to separate

01:31:12.950 --> 01:31:15.110
Your configuration from the main pod file

01:31:15.710 --> 01:31:22.350
And secrets is what you're going to separate your passwords and private keys other tech other information very sensitive

01:31:22.350 --> 01:31:25.210
You don't want to put in the main code. You're going to put your secrets

01:31:27.070 --> 01:31:27.630
So

01:31:27.630 --> 01:31:33.330
So what i'm saying here is you create a basic pod just pod with very minimal information

01:31:34.110 --> 01:31:40.790
And all the configurations would be in a kind called as config map and when you log into the pod

01:31:41.330 --> 01:31:43.970
The pod you get the information of these

01:31:44.590 --> 01:31:46.610
either mounted as an enb

01:31:47.130 --> 01:31:48.290
Or a volume

01:31:49.610 --> 01:31:51.810
And you can start doing your work

01:31:53.530 --> 01:31:54.050
Yeah

01:31:54.050 --> 01:31:55.530
So let's see this

01:31:55.530 --> 01:31:59.970
I'll give a simple example. I want you to let me know this is clear. So this is my config map

01:32:00.930 --> 01:32:02.670
In my config map

01:32:03.430 --> 01:32:08.510
I'm saying a database name on the url and I create it or apply the details

01:32:09.030 --> 01:32:10.870
I describe it

01:32:10.870 --> 01:32:13.690
Then I want to use this in my pod

01:32:14.710 --> 01:32:17.030
So I would say time pod

01:32:18.530 --> 01:32:20.910
Name and say enb from

01:32:21.510 --> 01:32:27.730
So whatever data was there in the configuration map, it will get mapped to the enb. I apply it

01:32:27.730 --> 01:32:30.770
And then I will log into the part and type in enb

01:32:31.690 --> 01:32:36.950
You can see the information. What was there in a config map be clear. Did you understand this? No

01:32:37.970 --> 01:32:38.530
Yeah

01:32:39.090 --> 01:32:44.610
So this is this is one method there is one challenge in this method the challenge in here is

01:32:45.210 --> 01:32:48.110
Tomorrow I can go and update the configurations

01:32:48.850 --> 01:32:49.970
I can do apply

01:32:49.970 --> 01:32:55.110
But these changes and then you can again do apply for this part

01:32:55.110 --> 01:33:01.250
The changes doesn't reflect in the enb because the enb is something like a hard bound they get mounted

01:33:01.250 --> 01:33:03.530
It's quite difficult to unmount it

01:33:04.110 --> 01:33:09.170
And the enb doesn't give you huge data to be saved. It just gives you some lines

01:33:09.170 --> 01:33:13.790
It doesn't the number of limits is then enb. You cannot want to be very big files

01:33:13.790 --> 01:33:18.470
So for that purpose what you can do is you want to mount as a volume

01:33:18.470 --> 01:33:23.130
So what you now do is instead of using the enb

01:33:23.130 --> 01:33:30.570
You can say that I want to mount the config map as a volume. This is a volume. This is a volume name

01:33:31.370 --> 01:33:36.250
This is a volume name and you would refer the contents of this would get mapped amount

01:33:36.250 --> 01:33:40.050
And this contents could be a map and a contain in the etc config

01:33:40.710 --> 01:33:41.830
so now

01:33:41.830 --> 01:33:43.410
You apply it

01:33:43.410 --> 01:33:44.710
You go ahead

01:33:44.710 --> 01:33:49.150
And make some changes and you'll be able to see the changes have updating

01:33:50.630 --> 01:33:56.930
And you put a container we go inside this and you see the contained contents what were the config maps

01:33:57.630 --> 01:34:04.510
So this is how we can separate the config the config maps are meant for non-sensitive data

01:34:04.510 --> 01:34:09.250
So non-sensitive data means like usernames could be public keys

01:34:09.250 --> 01:34:11.330
Could be some urls

01:34:11.330 --> 01:34:14.190
For those type of things we can use config maps

01:34:14.190 --> 01:34:19.130
If any sensitive information is there we have to do very similarly we use secrets

01:34:20.050 --> 01:34:24.850
Yeah, so let's start the lab now. So config maps and secret the first lab we're going to do now

01:34:43.030 --> 01:34:44.770
Yeah now apply it

01:34:52.150 --> 01:34:52.690
You

01:34:52.690 --> 01:34:54.810
And you see it has two

01:34:55.390 --> 01:34:59.470
Can't see this you could do a describe of other roles do a describe you want

01:35:01.350 --> 01:35:06.030
Config map and then the name of the config map