1
00:00:00,000 --> 00:00:10,266
Hi let us understand about various components of kubernetes. Within kubernetes

2
00:00:10,266 --> 00:00:18,099
the working hours is a pod. So pod is going to be the working hour where the pod can have

3
00:00:18,100 --> 00:00:20,766
n number of containers, as we discussed

4
00:00:20,766 --> 00:00:23,566
earlier container is nothing but a entity

5
00:00:23,566 --> 00:00:26,432
which is going to encapsulate an image from

6
00:00:26,433 --> 00:00:29,599
any repository. Let's assume I do have a

7
00:00:29,600 --> 00:00:32,732
repository and it may have n number of

8
00:00:32,732 --> 00:00:35,599
images within it, let's assume I do have an

9
00:00:35,600 --> 00:00:40,233
image http, a web server I can use this

10
00:00:40,233 --> 00:00:42,966
particular image as a part of this particular

11
00:00:42,966 --> 00:00:47,199
pod and pod can have n number of other

12
00:00:47,200 --> 00:00:50,066
containers as well along with this particular

13
00:00:50,066 --> 00:00:54,399
container. Say if I have http I may need some

14
00:00:54,400 --> 00:00:57,200
other containers to manage this particular

15
00:00:57,200 --> 00:01:00,600
container mostly we will be using a mesh

16
00:01:00,600 --> 00:01:03,966
mostly we will be using some sort of a proxy

17
00:01:03,966 --> 00:01:06,599
For now assume there may or there may not

18
00:01:06,600 --> 00:01:10,000
be another container and a pod can have

19
00:01:10,000 --> 00:01:13,266
n number of containers. Kubernetes is all

20
00:01:13,266 --> 00:01:15,732
about managing or orchestrating this

21
00:01:15,733 --> 00:01:19,233
particular pod. I may want to start n number

22
00:01:19,233 --> 00:01:22,799
of pods and manage them within the

23
00:01:22,800 --> 00:01:26,033
infrastructure. So we call that as an

24
00:01:26,033 --> 00:01:28,733
orchestrator for that I am going to use a

25
00:01:28,733 --> 00:01:32,833
client code kubectl. How this particular pod

26
00:01:32,833 --> 00:01:35,599
should get created, so declaratively I will be

27
00:01:35,600 --> 00:01:38,866
defining the structure of the pod that will be

28
00:01:38,866 --> 00:01:43,199
using a yaml file. So this will have the details

29
00:01:43,200 --> 00:01:46,100
on what should be the image and what port

30
00:01:46,100 --> 00:01:48,866
of this particular container should get exposed

31
00:01:48,866 --> 00:01:51,732
and what type of pod should get created all

32
00:01:51,733 --> 00:01:54,099
this informations will be available as a part of

33
00:01:54,100 --> 00:01:58,600
this particular xyz.yaml file. Now I can use this

34
00:01:58,600 --> 00:02:02,633
particular kubectl and use this yaml file and

35
00:02:02,633 --> 00:02:05,599
create the pod. So the pod will get created

36
00:02:05,600 --> 00:02:08,633
using the kubernetes cluster and cluster

37
00:02:08,633 --> 00:02:11,599
it's going to have master and worker and

38
00:02:11,600 --> 00:02:13,800
there are n number of components available

39
00:02:13,800 --> 00:02:16,466
as a part of master worker architecture to

40
00:02:16,466 --> 00:02:19,632
manage this particular pods. Assume I do

41
00:02:19,633 --> 00:02:23,833
have a master and n number of workers. As

42
00:02:23,833 --> 00:02:25,799
we discussed earlier the worker needs to

43
00:02:25,800 --> 00:02:28,466
report to the master. The workers will have

44
00:02:28,466 --> 00:02:32,799
a component called kubelet, a small

45
00:02:32,800 --> 00:02:36,866
process or a daemon which will continue to run in

46
00:02:36,866 --> 00:02:40,132
each worker machine and to manage all this

47
00:02:40,133 --> 00:02:43,466
worker or this kubelet I am going to have a

48
00:02:43,466 --> 00:02:48,066
controller within the master. There are n

49
00:02:48,066 --> 00:02:50,166
number of controllers available like node

50
00:02:50,166 --> 00:02:57,066
controller, replication controller, router, volume

51
00:02:57,066 --> 00:03:00,799
and many more. So this controller will be

52
00:03:00,800 --> 00:03:03,433
controlling how this particular node should

53
00:03:03,433 --> 00:03:05,366
behave, what are all the availability of the

54
00:03:05,366 --> 00:03:08,599
resources and what work currently it is doing

55
00:03:08,600 --> 00:03:10,600
all will be controlled by this particular

56
00:03:10,600 --> 00:03:14,600
controller and I'm going to start a pod within

57
00:03:14,600 --> 00:03:16,966
this worker machines and pod going to have

58
00:03:16,966 --> 00:03:20,166
a container. So I need a runtime to run the

59
00:03:20,166 --> 00:03:22,699
containers, so I need a container runtime

60
00:03:22,700 --> 00:03:26,600
in each worker machine. Container run time it

61
00:03:26,600 --> 00:03:35,333
could be of docker racket rkt or even containerd

62
00:03:35,333 --> 00:03:39,399
predominantly we will be using docker and

63
00:03:39,400 --> 00:03:41,933
depending on the type of runtime that

64
00:03:41,933 --> 00:03:43,799
corresponding containers would get created

65
00:03:43,800 --> 00:03:47,033
within the pod. So each worker machine will

66
00:03:47,033 --> 00:03:52,099
have a run time to start the containers and to

67
00:03:52,100 --> 00:03:54,633
interact with this particular cluster I need to

68
00:03:54,633 --> 00:03:59,533
have a component that is called API server.

69
00:03:59,533 --> 00:04:02,366
So the user will be interacting with this API

70
00:04:02,366 --> 00:04:06,299
server and provide the yaml file and say I

71
00:04:06,300 --> 00:04:09,133
wanted this type of infrastructure or this

72
00:04:09,133 --> 00:04:11,999
many number of pods to get created and

73
00:04:12,000 --> 00:04:14,800
depending on the availability of the resources

74
00:04:14,800 --> 00:04:17,966
the kube scheduler will schedule there is

75
00:04:17,966 --> 00:04:21,466
another component called kube scheduler

76
00:04:21,466 --> 00:04:23,666
where the pod should get created, what type

77
00:04:23,666 --> 00:04:25,599
of pod should get created, how it should get

78
00:04:25,600 --> 00:04:29,200
created. So correspondingly the pod would

79
00:04:29,200 --> 00:04:32,433
get created. So all these pods will be

80
00:04:32,433 --> 00:04:36,266
managed by kube scheduler and within the pod

81
00:04:36,266 --> 00:04:41,166
I am going to have the containers and I can

82
00:04:41,166 --> 00:04:43,499
consolidate and group all these containers

83
00:04:43,500 --> 00:04:47,200
together and I will be calling that as a service

84
00:04:47,200 --> 00:04:49,800
say I may deploy an application and that

85
00:04:49,800 --> 00:04:52,600
should have three web servers and a load

86
00:04:52,600 --> 00:04:55,633
balancer and all this will be consolidated and

87
00:04:55,633 --> 00:04:58,599
managed together as a service like this we

88
00:04:58,600 --> 00:05:00,700
have n number of components involved

89
00:05:00,700 --> 00:05:03,366
within kubernetes we will be seeing all of them

90
00:05:03,366 --> 00:05:06,399
one after the other and basically the core

91
00:05:06,400 --> 00:05:09,466
building block of kubernetes is a pod and the

92
00:05:09,466 --> 00:05:12,566
pod going to have n number of containers

93
00:05:12,566 --> 00:05:15,132
most of the time it is recommended to have

94
00:05:15,133 --> 00:05:17,799
just one containers but it can have other

95
00:05:17,800 --> 00:05:21,100
containers we call them as sidecar or the

96
00:05:21,100 --> 00:05:23,566
container that's going to work closely with

97
00:05:23,566 --> 00:05:27,499
the core container. Now I can go ahead and

98
00:05:27,500 --> 00:05:29,866
add n number of workers or remove the

99
00:05:29,866 --> 00:05:31,866
worker for any other maintenance purpose

100
00:05:31,866 --> 00:05:34,799
and do the configuration within the cluster all

101
00:05:34,800 --> 00:05:37,700
this needs to be stored and I'm going to use

102
00:05:37,700 --> 00:05:42,733
a database called etcd and this is a key

103
00:05:42,733 --> 00:05:45,199
value pair database and the configurations

104
00:05:45,200 --> 00:05:49,066
will be stored within the etcd database and

105
00:05:49,066 --> 00:05:51,199
for high availability I can go for multiple

106
00:05:51,200 --> 00:05:54,466
masters as well. Now we do have all the

107
00:05:54,466 --> 00:05:56,999
components put in a single place, now let's

108
00:05:57,000 --> 00:05:59,400
explore the components available as a part

109
00:05:59,400 --> 00:06:03,033
of the master as well as the workers. So

110
00:06:03,033 --> 00:06:05,199
within master I'm going to have API server

111
00:06:05,200 --> 00:06:08,566
that will be used for the users to interact with

112
00:06:08,566 --> 00:06:10,566
and I am going to have a kube scheduler to

113
00:06:10,566 --> 00:06:13,766
manage the pods and which node should do

114
00:06:13,766 --> 00:06:16,166
that particular work of the pod in

115
00:06:16,166 --> 00:06:20,966
which node the pod should get started and where it should not get started, how the load

116
00:06:20,966 --> 00:06:26,199
is within the nodes all will be managed by the kube scheduler and what are all the nodes

117
00:06:26,200 --> 00:06:29,066
available and how the replication can happen

118
00:06:29,066 --> 00:06:31,366
where it can happen all will be controlled by

119
00:06:31,366 --> 00:06:33,799
this controllers and there are n number of

120
00:06:33,800 --> 00:06:36,133
controllers available, as of now assume I do

121
00:06:36,133 --> 00:06:38,333
have a controller to do different type of

122
00:06:38,333 --> 00:06:42,399
controls like replications routing volumes and

123
00:06:42,400 --> 00:06:45,800
other activities. In the same way I do have a

124
00:06:45,800 --> 00:06:50,733
key value pair database called etcd database. The similar

125
00:06:50,733 --> 00:06:55,099
way if I get into the worker machines each

126
00:06:55,100 --> 00:06:57,100
worker machine it's going to have a

127
00:06:57,100 --> 00:06:59,933
component called kubelet and it's going to

128
00:06:59,933 --> 00:07:02,199
have a container runtime environment it

129
00:07:02,200 --> 00:07:05,633
could be of docker rkt or containerd

130
00:07:05,633 --> 00:07:09,133
Containerd is open sourced by docker and rkt

131
00:07:09,133 --> 00:07:11,433
is another type of container provided by red

132
00:07:11,433 --> 00:07:14,333
hat and I will be having another small

133
00:07:14,333 --> 00:07:16,933
component called kube proxy to take care of

134
00:07:16,933 --> 00:07:19,766
the networking. All the pods and the

135
00:07:19,766 --> 00:07:22,332
containers across the nodes needs to be

136
00:07:22,333 --> 00:07:24,333
communicated within each other and that

137
00:07:24,333 --> 00:07:28,133
will be facilitated by the kube proxy. So just to

138
00:07:28,133 --> 00:07:31,433
recall how the workflow will happen the user

139
00:07:31,433 --> 00:07:34,299
will be having a yaml file that is declarative

140
00:07:34,300 --> 00:07:37,533
way of defining how the services or the pod

141
00:07:37,533 --> 00:07:40,999
should exist and that will be provided to the

142
00:07:41,000 --> 00:07:43,400
API server and that is done using a

143
00:07:43,400 --> 00:07:46,833
component called kubectl and API server will

144
00:07:46,833 --> 00:07:49,199
process this yml file with the help of

145
00:07:49,200 --> 00:07:51,666
kube scheduler and the controller it will

146
00:07:51,666 --> 00:07:53,999
define which are all the worker machine

147
00:07:54,000 --> 00:07:56,566
should have the pods and how many pods

148
00:07:56,566 --> 00:07:58,932
and where it should get created. So the pods

149
00:07:58,933 --> 00:08:01,466
will be assigned, so that's going to have X

150
00:08:01,466 --> 00:08:03,932
amount of capacity of memory processing

151
00:08:03,933 --> 00:08:06,366
capacity within that the containers can get

152
00:08:06,366 --> 00:08:09,066
started. So the worker machines will be

153
00:08:09,066 --> 00:08:11,066
communicating with the registry or the

154
00:08:11,066 --> 00:08:14,132
repository to get the image of the container

155
00:08:14,133 --> 00:08:16,933
get the container started and the proxy

156
00:08:16,933 --> 00:08:19,233
available will facilitate the networking within

157
00:08:19,233 --> 00:08:21,999
the worker machines and the kubelet it's also

158
00:08:22,000 --> 00:08:25,100
called as an agent. So that's going to keep

159
00:08:25,100 --> 00:08:26,966
providing the report to the controller how

160
00:08:26,966 --> 00:08:29,099
much amount of resources available and

161
00:08:29,100 --> 00:08:31,300
where the future pods can be started that

162
00:08:31,300 --> 00:08:33,299
can be controlled and managed by the

163
00:08:33,299 --> 00:08:35,600
controller. So in a quick summary we had

164
00:08:35,600 --> 00:08:37,400
seen what are all the different type of

165
00:08:37,400 --> 00:08:40,265
components available within a kubernetes

166
00:08:40,265 --> 00:08:43,599
cluster and this is a high-level overview on

167
00:08:43,600 --> 00:08:46,200
how all this components going to come

168
00:08:46,200 --> 00:08:48,033
together we will be discussing each and

169
00:08:48,033 --> 00:08:52,899
every component in detail this is just a quick
introduction on various

170
00:08:52,900 --> 00:08:58,066
terminologies and the components involved
within kubernetes.

