1
00:00:02,230 --> 00:00:06,150
So Kubernetes is this collection of concepts and tools,

2
00:00:06,150 --> 00:00:10,530
which can help us with deploying containers anywhere.

3
00:00:10,530 --> 00:00:14,030
Let's therefore now, dig into the architecture

4
00:00:14,030 --> 00:00:16,070
of a Kubernetes deployment

5
00:00:16,070 --> 00:00:19,460
and let's see what Kubernetes can set up and manage

6
00:00:19,460 --> 00:00:23,200
on any cloud provider of our choice.

7
00:00:23,200 --> 00:00:27,660
And it all starts with a container which we wanna deploy,

8
00:00:27,660 --> 00:00:31,440
which in the Kubernetes world is actually managed

9
00:00:31,440 --> 00:00:33,670
by a so-called pod.

10
00:00:33,670 --> 00:00:38,340
You can think of a pod as the smallest possible unit

11
00:00:38,340 --> 00:00:40,060
in the Kubernetes world,

12
00:00:40,060 --> 00:00:43,240
which you can define in some configuration fall

13
00:00:43,240 --> 00:00:45,320
for a Kubernetes to create.

14
00:00:45,320 --> 00:00:48,720
And the pod simply holds a container.

15
00:00:48,720 --> 00:00:52,630
Actually, a pod is always able to hold multiple containers

16
00:00:52,630 --> 00:00:54,600
which might need to work together

17
00:00:54,600 --> 00:00:57,950
but the smallest possible unit is simply one pod

18
00:00:57,950 --> 00:01:01,640
which then in turn is responsible for running this container

19
00:01:01,640 --> 00:01:04,653
or which is basically executing this container.

20
00:01:05,730 --> 00:01:08,730
Now this pod with the container inside of it,

21
00:01:08,730 --> 00:01:13,350
then itself, runs on a so-called worker node.

22
00:01:13,350 --> 00:01:17,450
So a worker node is the thing in the Kubernetes world

23
00:01:17,450 --> 00:01:19,970
which runs your containers in the end.

24
00:01:19,970 --> 00:01:23,930
And you can think of worker nodes as your machines,

25
00:01:23,930 --> 00:01:25,980
your virtual instances.

26
00:01:25,980 --> 00:01:30,300
So in the AWS world which we saw in the deployment section

27
00:01:30,300 --> 00:01:33,540
an EC2 instance which is a remote machine

28
00:01:33,540 --> 00:01:37,780
fully owned and managed by you could be a worker node.

29
00:01:37,780 --> 00:01:41,650
A worker node is simply a machine, a computer somewhere,

30
00:01:41,650 --> 00:01:44,550
with a certain amount of CPU and memory

31
00:01:44,550 --> 00:01:47,870
and on that machine, you can run your pods.

32
00:01:47,870 --> 00:01:49,890
And you can have more than one pod

33
00:01:49,890 --> 00:01:52,373
running on one of the same worker node.

34
00:01:53,620 --> 00:01:58,360
Now besides this worker node pod concept on a worker node

35
00:01:58,360 --> 00:02:01,940
Kubernetes also needs a proxy

36
00:02:01,940 --> 00:02:04,350
which in the end just is another tool

37
00:02:04,350 --> 00:02:07,160
Kubernetes sets up for you in the end

38
00:02:07,160 --> 00:02:11,310
on such a worker node to control the network traffic

39
00:02:11,310 --> 00:02:14,290
of the pods on that worker node.

40
00:02:14,290 --> 00:02:16,080
So basically to control

41
00:02:16,080 --> 00:02:18,460
whether these pods can reach the internet

42
00:02:18,460 --> 00:02:19,950
and how these pods

43
00:02:19,950 --> 00:02:22,770
and therefore the containers running inside of them,

44
00:02:22,770 --> 00:02:25,720
can be reached from the outside world.

45
00:02:25,720 --> 00:02:28,450
If you are running a web application

46
00:02:28,450 --> 00:02:31,190
in a container in such a pod for example,

47
00:02:31,190 --> 00:02:34,140
the proxy needs to be configured such that

48
00:02:34,140 --> 00:02:37,390
traffic from the outside world from your users

49
00:02:37,390 --> 00:02:39,350
is able to reach this container.

50
00:02:39,350 --> 00:02:43,190
And of course, we will learn how to set all these things up

51
00:02:43,190 --> 00:02:46,730
and how to create and deploy all these things

52
00:02:46,730 --> 00:02:50,020
throughout the next lectures and course modules.

53
00:02:50,020 --> 00:02:51,420
No worries.

54
00:02:51,420 --> 00:02:53,660
Now when working with Kubernetes,

55
00:02:53,660 --> 00:02:56,620
you typically need at least one worker node

56
00:02:56,620 --> 00:02:59,790
because otherwise there is no place to run your pods

57
00:02:59,790 --> 00:03:02,520
and therefore your containers.

58
00:03:02,520 --> 00:03:04,980
But of course, for bigger applications,

59
00:03:04,980 --> 00:03:07,920
you typically will have more than one worker node

60
00:03:07,920 --> 00:03:11,430
which are then able to run your different pods.

61
00:03:11,430 --> 00:03:14,110
Because you might need more than one server

62
00:03:14,110 --> 00:03:16,210
to have enough compute power

63
00:03:16,210 --> 00:03:18,400
to run all your containers

64
00:03:18,400 --> 00:03:21,330
and this includes containers scaling.

65
00:03:21,330 --> 00:03:24,660
If you use Kubernetes to dynamically add

66
00:03:24,660 --> 00:03:28,040
and remove containers, and therefore pods,

67
00:03:28,040 --> 00:03:30,980
as traffic in and decreases

68
00:03:30,980 --> 00:03:35,940
these pods are automatically distributed by Kubernetes

69
00:03:35,940 --> 00:03:38,663
across all available worker nodes.

70
00:03:39,620 --> 00:03:42,680
So you can have different and equal containers

71
00:03:42,680 --> 00:03:45,390
running on multiple worker nodes

72
00:03:45,390 --> 00:03:47,693
to distribute workload evenly.

73
00:03:48,720 --> 00:03:50,820
Now all these worker nodes

74
00:03:50,820 --> 00:03:54,390
and the pods and containers running on them,

75
00:03:54,390 --> 00:03:57,150
need to be controlled somehow.

76
00:03:57,150 --> 00:04:01,430
Someone needs to create and start these containers and pods

77
00:04:01,430 --> 00:04:04,460
and someone needs to replace them or shut them down

78
00:04:04,460 --> 00:04:07,820
if they are failing or not needed anymore.

79
00:04:07,820 --> 00:04:10,840
And that's done by the master node

80
00:04:10,840 --> 00:04:14,810
specifically by the control plane as it's called.

81
00:04:14,810 --> 00:04:17,200
So this is basically the control center

82
00:04:17,200 --> 00:04:21,950
which then interacts with the worker nodes to control them.

83
00:04:21,950 --> 00:04:24,110
So when working with Kubernetes,

84
00:04:24,110 --> 00:04:26,910
you typically don't directly interact

85
00:04:26,910 --> 00:04:29,710
with your worker nodes or pods,

86
00:04:29,710 --> 00:04:32,710
though you could do that, but you typically don't do that,

87
00:04:32,710 --> 00:04:37,140
instead you let Kubernetes and this control plane

88
00:04:37,140 --> 00:04:41,300
do that heavy lifting and you as a developer

89
00:04:41,300 --> 00:04:44,440
just define the desired end state

90
00:04:44,440 --> 00:04:47,430
Kubernetes should take into account.

91
00:04:47,430 --> 00:04:51,190
So it's this master node simply another server

92
00:04:51,190 --> 00:04:52,430
another remote machine,

93
00:04:52,430 --> 00:04:55,220
which has this control plane running on it,

94
00:04:55,220 --> 00:04:58,520
which then is responsible for interacting

95
00:04:58,520 --> 00:05:01,593
with the worker nodes and the pods running on them.

96
00:05:02,560 --> 00:05:06,610
Now theoretically, you can have one machine

97
00:05:06,610 --> 00:05:10,150
which acts as both the master and only worker node,

98
00:05:10,150 --> 00:05:12,050
but for bigger deployments

99
00:05:12,050 --> 00:05:14,240
of course you will have a master node

100
00:05:14,240 --> 00:05:16,200
which itself might actually be split

101
00:05:16,200 --> 00:05:20,320
across multiple machines to ensure high availability

102
00:05:20,320 --> 00:05:23,870
and your worker nodes would then be other instances

103
00:05:23,870 --> 00:05:27,470
other machines independent from the master node.

104
00:05:27,470 --> 00:05:30,010
So that if one worker node goes down,

105
00:05:30,010 --> 00:05:33,023
your master node doesn't go down together with it.

106
00:05:34,210 --> 00:05:37,740
Now on the master node, this control plane thing,

107
00:05:37,740 --> 00:05:41,000
is actually a collection of different tools

108
00:05:41,000 --> 00:05:44,120
different services, which are running on the master node.

109
00:05:44,120 --> 00:05:45,660
And we'll have a closer look

110
00:05:45,660 --> 00:05:49,523
at both a worker and master node in just a second.

111
00:05:50,790 --> 00:05:54,960
Now all together, this forum's a cluster.

112
00:05:54,960 --> 00:05:56,710
This forms a cluster

113
00:05:56,710 --> 00:06:00,860
of your master and worker nodes and therefore one network

114
00:06:00,860 --> 00:06:04,490
in which all these different parts are connected.

115
00:06:04,490 --> 00:06:08,930
And then your master node is able to send instructions

116
00:06:08,930 --> 00:06:11,770
to a cloud provider API,

117
00:06:11,770 --> 00:06:13,900
to tell that cloud provider

118
00:06:13,900 --> 00:06:18,070
to create it's cloud provider specific resources

119
00:06:18,070 --> 00:06:23,070
to replicate this desired big picture this end state

120
00:06:23,530 --> 00:06:26,100
on that cloud provider.

121
00:06:26,100 --> 00:06:31,100
So if we think about AWS, we might interact with AWS

122
00:06:31,440 --> 00:06:36,440
such that AWS creates all the required EC2 instances

123
00:06:36,650 --> 00:06:39,280
a load balancer which might be needed

124
00:06:39,280 --> 00:06:43,700
and everything else which is required to have this network

125
00:06:43,700 --> 00:06:48,150
and to then have Kubernetes and some Kubernetes tools

126
00:06:48,150 --> 00:06:51,570
running on the master node, EC2 instance,

127
00:06:51,570 --> 00:06:55,480
which then in turn controls the other EC2 instances,

128
00:06:55,480 --> 00:06:57,130
which belong to this network

129
00:06:57,130 --> 00:07:00,940
to then run containers in these pods on them.

130
00:07:00,940 --> 00:07:02,540
Now I'm totally aware

131
00:07:02,540 --> 00:07:06,660
that this at this point still sounds a bit abstract

132
00:07:06,660 --> 00:07:10,100
it will make more sense once we get our hands dirty

133
00:07:10,100 --> 00:07:12,910
and once we start working with Kubernetes

134
00:07:12,910 --> 00:07:15,000
in the next course section.

135
00:07:15,000 --> 00:07:17,610
It's this theory and big picture

136
00:07:17,610 --> 00:07:20,460
which you should have in your mind first though

137
00:07:20,460 --> 00:07:24,220
so that all the terms and the concepts we use

138
00:07:24,220 --> 00:07:28,163
in the hands-on section later, make sense to you.

139
00:07:29,250 --> 00:07:31,540
Now, before we get our hands dirty though,

140
00:07:31,540 --> 00:07:34,973
let's dig a bit deeper into worker and master nodes.

