1
00:00:00,000 --> 00:00:10,933
Hi let's have a better understanding on various core components of kubernetes cluster.

2
00:00:10,933 --> 00:00:16,332
Already we had a quick discussion on various components involved, now I am going to explain

3
00:00:16,332 --> 00:00:21,733
with an analogy as well as compare it with the cluster that we have installed. So that we will

4
00:00:21,733 --> 00:00:25,999
have better understanding on how they are related to each other and what functionality

5
00:00:26,000 --> 00:00:30,466
they are going to do and we are going to have a detailed discussion on each and every

6
00:00:30,466 --> 00:00:35,632
component in future. When it comes to the core components there are two different categories

7
00:00:35,633 --> 00:00:40,399
available that is controlled plane and runtime components. As a part of controlled plane

8
00:00:40,400 --> 00:00:44,300
components that's going to make sure the kubernetes cluster is up and running

9
00:00:44,300 --> 00:00:50,400
that's where I am going to have kube api server, kube controller manager, kube scheduler and

10
00:00:50,400 --> 00:00:54,900
etcd database. As a part of run time components, I am going to have

11
00:00:54,900 --> 00:01:01,666
kubelet, kube proxy and container runtime like docker rocketd or containerd. These

12
00:01:01,666 --> 00:01:06,866
three components going to make sure the applications within the kubernetes is running

13
00:01:06,866 --> 00:01:13,799
fine. Now let us have a quick analogy and relate these components. I'm going to explain with

14
00:01:13,800 --> 00:01:19,133
an analogy and I'm going to map each and every component of this analogy to the real

15
00:01:19,133 --> 00:01:25,933
component of kubernetes. I'm going to match the functionalities, so don't try to match as it is

16
00:01:25,933 --> 00:01:33,599
for understanding purpose this analogy is made. Assume I do have a head office and n number

17
00:01:33,600 --> 00:01:40,400
of branches operated in different locations. For understanding purpose I am going to have a

18
00:01:40,400 --> 00:01:49,266
location say Chennai and another location in say New York and within head office I will be having

19
00:01:49,266 --> 00:01:57,132
different departments, say one department going to take care of all the communications.

20
00:01:57,133 --> 00:02:02,933
That is within the departments within head office as well as communications to the other

21
00:02:02,933 --> 00:02:07,933
branches the communication department going to take care. The same way I will be having

22
00:02:07,933 --> 00:02:13,099
another department that's going to make all the planning for the projects, how to execute the

23
00:02:13,100 --> 00:02:16,733
current project and what are all the future projects, where to execute the future projects

24
00:02:16,733 --> 00:02:21,299
basically all the planning will be done by the planning department and I will be having

25
00:02:21,300 --> 00:02:27,733
HR department, they'll be taking care of the people and each branch office they will be

26
00:02:27,733 --> 00:02:35,799
having a head, who is going to take care of that particular department or the branch. Let's call

27
00:02:35,800 --> 00:02:43,000
him as branch manager. So each branch going to have a manager and the entire branch will be

28
00:02:43,000 --> 00:02:47,800
under the control of the branch manager in terms of who are all working in that specific

29
00:02:47,800 --> 00:02:53,700
branch whether everyone is getting the required resources or not and everyone is secure and

30
00:02:53,700 --> 00:02:59,633
safe everyone adhere into the same policy, put in within that specific Branch or not. So the

31
00:02:59,633 --> 00:03:04,066
entire branch will be under the control of the branch manager and the branch manager

32
00:03:04,066 --> 00:03:10,399
will be having a secretary to coordinate the communication. So the entire communication

33
00:03:10,400 --> 00:03:16,266
coming in or going out of the branch will be going through the secretary and all the details

34
00:03:16,266 --> 00:03:21,399
about the head office the people who are working what project being managed the data

35
00:03:21,400 --> 00:03:27,100
needs to be stored somewhere. So I'm going to have a data store and that needs to be very very

36
00:03:27,100 --> 00:03:35,833
highly available so I may have a cluster of databases which is going to store all the data about the people what communication

37
00:03:35,833 --> 00:03:42,333
is happening and what are all the reporting hierarchy every information will be stored within

38
00:03:42,333 --> 00:03:49,999
this specific database and the branch manager will be reporting to the head office through the

39
00:03:50,000 --> 00:03:56,666
communication channel and for external communication I will be having a reception. So

40
00:03:56,666 --> 00:04:02,632
whoever wants to communicate they will be coming through this specific or the protocol

41
00:04:02,633 --> 00:04:09,733
with which they will be communicating and that's the reception or the front desk. Now

42
00:04:09,733 --> 00:04:16,333
I am going to replace each and every component related to the kubernetes. Branch

43
00:04:16,333 --> 00:04:23,733
manager that's the kubelet and that's going to run in each and every worker machine and the

44
00:04:23,733 --> 00:04:28,399
communication entire communication will be handled by the kube api server and

45
00:04:28,400 --> 00:04:33,900
the front desk that is like kubectl tool and that will be used to make the communication and

46
00:04:33,900 --> 00:04:40,000
that's going to leverage the kube api server to do all communication and project planning

47
00:04:40,000 --> 00:04:48,266
that's called a scheduler kube scheduler and the HR that's called controller and the database

48
00:04:48,266 --> 00:04:56,599
that is etcd database and that's going to work us a cluster or a quorum. Manager secretary is

49
00:04:56,600 --> 00:05:02,833
the kube-proxy. Now let's assume I do have a cluster where there is no job happening and

50
00:05:02,833 --> 00:05:08,333
how the reporting hierarchy and what is going to report to what. The kubelet that's going to be a

51
00:05:08,333 --> 00:05:14,133
continuously running daemon and that will be made to get installed in each and every machine,

52
00:05:14,133 --> 00:05:19,933
along with kubelet I will be having kube-proxy the reason because I may start n number of

53
00:05:19,933 --> 00:05:25,133
pods and all the communication within the pods within the nodes as well as across the

54
00:05:25,133 --> 00:05:30,799
nodes and going across the cluster needs to be taken care and that will be coordinated by the

55
00:05:30,800 --> 00:05:35,466
kube proxy. The kube proxy will support n number of network provider to support the

56
00:05:35,466 --> 00:05:42,399
network communications and kube scheduler that's going to find out which node can take

57
00:05:42,400 --> 00:05:49,233
what type of work. Say for example I may have a different infrastructure, say for example this

58
00:05:49,233 --> 00:05:56,266
particular machine will have SSD and graph processor, the similar way I may have another

59
00:05:56,266 --> 00:06:03,766
node which is going to have SSD and graph processor. So what that means is any process

60
00:06:03,766 --> 00:06:08,166
related to machine learning if it is executed using the graph processor the efficiency is

61
00:06:08,166 --> 00:06:15,332
going to be much higher. So I need to have a planner which is going to place the container

62
00:06:15,333 --> 00:06:20,399
so that the container is placed within this specific node, where the graph processor is

63
00:06:20,400 --> 00:06:26,033
available. So in the similar way I may have different type of requirements like all

64
00:06:26,033 --> 00:06:33,266
the front end containers needs to have the cache running along with the node. Say

65
00:06:33,266 --> 00:06:38,899
I do have a front end container and it's going to use some cache for better performance.

66
00:06:38,900 --> 00:06:43,200
So the cache should be co-located along with a front end so these type of scheduling

67
00:06:43,200 --> 00:06:49,033
requirement will be required for the containers and the kube scheduler going to take care of

68
00:06:49,033 --> 00:06:54,533
what container should be placed in which node. I may have some constraints that particular

69
00:06:54,533 --> 00:06:57,933
node will not have enough space to accommodate the container

70
00:06:57,933 --> 00:07:04,066
So the kube scheduler going to find out which node going to have the space and it's going to

71
00:07:04,066 --> 00:07:10,332
prioritize which node can do that particular job in a better way, accordingly it will be scheduling

72
00:07:10,333 --> 00:07:17,433
the requirement to put in the container and as per the schedule the kubelet will take care of

73
00:07:17,433 --> 00:07:22,933
creating the container and make it up and running. Once the container is up and running

74
00:07:22,933 --> 00:07:29,066
that will be controlled by the controller, in terms of which are all the group of containers going to

75
00:07:29,066 --> 00:07:35,132
work together and serve the front end. Front end I'm just considering it as an application

76
00:07:35,133 --> 00:07:41,299
a web application just for example. Now within the application I may have a requirement

77
00:07:41,300 --> 00:07:47,066
I need to have two replica of front end and that should be getting executed where I do have the

78
00:07:47,066 --> 00:07:53,466
SSD processor. So accordingly the scheduler will decide which node can do that job in a

79
00:07:53,466 --> 00:07:58,866
better way once that is decided the container will get started. Once it is started that will be

80
00:07:58,866 --> 00:08:04,132
controlled by the controller, in case if that particular node goes offline for some reason

81
00:08:04,133 --> 00:08:13,233
and it couldn't serve the request, it will decide one particular instance or one particular replica

82
00:08:13,233 --> 00:08:18,766
is not available and that needs to be scheduled in a different node. With the help of the

83
00:08:18,766 --> 00:08:23,799
scheduler it will identify that is the controller will identify which node can satisfy

84
00:08:23,800 --> 00:08:29,000
the requirement and accordingly the container will be placed in those nodes. So within

85
00:08:29,000 --> 00:08:34,033
controller I am going to have multiple controllers like node controller in terms of

86
00:08:34,033 --> 00:08:39,933
controlling the nodes replication controller in terms of controlling the replications and every

87
00:08:39,933 --> 00:08:48,699
machine will be having the run time that is docker or rocket or containerd. Accordingly the

88
00:08:48,700 --> 00:08:55,066
container would get created. So I do have a cluster up and running where I do have a master

89
00:08:55,066 --> 00:09:00,799
and node 2 is the master and I do have n number of workers that is node 3 and node 4

90
00:09:00,800 --> 00:09:07,966
I can get all the components as a part of the all namespaces, here I do have kubeapi server

91
00:09:07,966 --> 00:09:13,999
kube controller, kube scheduler and the kube proxy that is running in each and every machine

92
00:09:14,000 --> 00:09:19,633
to coordinate the communication and I am using calico network provider

93
00:09:19,633 --> 00:09:25,599
so the calico pod is also installed. Now you might be wondering where the kubeadm tool

94
00:09:25,600 --> 00:09:32,066
kubectl tool and kubelet. All these three components needs to be installed as a daemon

95
00:09:32,066 --> 00:09:36,932
that's why while doing the installation we will be installing all these components as a daemon.

96
00:09:36,933 --> 00:09:42,599
In this particular case we used kubeadm tool, so that's going to install the network provider

97
00:09:42,600 --> 00:09:49,366
controller api server all as a pod. As a next session as a introduction I am going to revise

98
00:09:49,366 --> 00:09:53,866
the different type of installations and what installation we did. So in a quick summary

99
00:09:53,866 --> 00:09:57,699
we related various components with an analogy for better understanding

100
00:09:57,700 --> 00:10:02,400
and to remember their functionalities.

