1
00:00:02,130 --> 00:00:04,600
Now in order to get our hands dirty,

2
00:00:04,600 --> 00:00:06,800
and to start working with Kubernetes,

3
00:00:06,800 --> 00:00:11,700
there is one really, really, really important thing you got

4
00:00:11,700 --> 00:00:14,100
to understand and keep in mind.

5
00:00:14,100 --> 00:00:18,360
And that is the split between work you as a developer

6
00:00:18,360 --> 00:00:20,960
and administrator have to do

7
00:00:20,960 --> 00:00:24,180
and the work Kubernetes will do for you.

8
00:00:24,180 --> 00:00:26,730
Because there is an important difference

9
00:00:26,730 --> 00:00:31,190
and it's crucial that you understand what Kubernetes does

10
00:00:31,190 --> 00:00:33,170
and what it does not.

11
00:00:33,170 --> 00:00:35,090
And there is one super important thing

12
00:00:35,090 --> 00:00:36,980
which Kubernetes will not do

13
00:00:36,980 --> 00:00:39,220
which you instead have to do.

14
00:00:39,220 --> 00:00:43,150
And that is the cluster and node creation.

15
00:00:43,150 --> 00:00:45,120
Now, you may be expected

16
00:00:45,120 --> 00:00:48,890
that Kubernetes is this all in one tool

17
00:00:48,890 --> 00:00:52,840
where you define your final architecture,

18
00:00:52,840 --> 00:00:55,790
so where you define your cluster,

19
00:00:55,790 --> 00:00:59,290
and your master node and worker node configurations,

20
00:00:59,290 --> 00:01:03,260
and Kubernetes creates all these resources for you.

21
00:01:03,260 --> 00:01:08,260
But I have to tell you that is not what Kubernetes does.

22
00:01:08,370 --> 00:01:10,060
And I actually mentioned this

23
00:01:10,060 --> 00:01:12,870
in the last course section already.

24
00:01:12,870 --> 00:01:16,460
Kubernetes helps you with managing these pods

25
00:01:16,460 --> 00:01:18,170
with monitoring the pods,

26
00:01:18,170 --> 00:01:20,400
monitoring the containers in the pods,

27
00:01:20,400 --> 00:01:24,210
replacing failing pods and scaling pods.

28
00:01:24,210 --> 00:01:27,670
It's really just about orchestrating these containers

29
00:01:27,670 --> 00:01:29,360
which are inside of the pods,

30
00:01:29,360 --> 00:01:32,510
and of moving them around between worker nodes

31
00:01:32,510 --> 00:01:35,580
and ensuring that everything is up and running

32
00:01:35,580 --> 00:01:38,210
and reachable by your end users,

33
00:01:38,210 --> 00:01:40,870
this is what Kubernetes does.

34
00:01:40,870 --> 00:01:42,630
So put in other words,

35
00:01:42,630 --> 00:01:45,140
Kubernetes is responsible

36
00:01:45,140 --> 00:01:49,380
for managing your deployed application for ensuring

37
00:01:49,380 --> 00:01:52,600
that your application runs the way it should run,

38
00:01:52,600 --> 00:01:54,660
that your containers are running,

39
00:01:54,660 --> 00:01:56,660
everything related to that.

40
00:01:56,660 --> 00:01:59,220
Kubernetes will not take care

41
00:01:59,220 --> 00:02:03,080
about the infrastructure your application needs.

42
00:02:03,080 --> 00:02:05,060
It doesn't know anything about that

43
00:02:05,060 --> 00:02:09,449
and it's not a cloud infrastructure creation tool

44
00:02:09,449 --> 00:02:11,510
or anything like that.

45
00:02:11,510 --> 00:02:14,670
As I also mentioned in the last section already,

46
00:02:14,670 --> 00:02:17,860
Kubernetes is not a cloud service provider

47
00:02:17,860 --> 00:02:20,150
and also not a specific service

48
00:02:20,150 --> 00:02:22,500
by one cloud service provider.

49
00:02:22,500 --> 00:02:24,880
Instead, it's a framework and a collection

50
00:02:24,880 --> 00:02:29,640
of concepts and tools which allows you to set up deployments

51
00:02:29,640 --> 00:02:33,110
for your containerized applications.

52
00:02:33,110 --> 00:02:34,780
But therefore, Kubernetes,

53
00:02:34,780 --> 00:02:37,290
of course, doesn't know anything

54
00:02:37,290 --> 00:02:39,940
about the concrete remote machines

55
00:02:39,940 --> 00:02:41,760
to concrete virtual instances

56
00:02:41,760 --> 00:02:44,290
or computers you wanna work with,

57
00:02:44,290 --> 00:02:45,790
it doesn't know them.

58
00:02:45,790 --> 00:02:49,520
So you have to create these machines in advance

59
00:02:49,520 --> 00:02:53,740
and you have to install the Kubernetes API server,

60
00:02:53,740 --> 00:02:57,450
the kubelets and all these different services I mentioned

61
00:02:57,450 --> 00:03:00,897
in the last module on these master

62
00:03:00,897 --> 00:03:03,830
and worker nodes which you have to create.

63
00:03:03,830 --> 00:03:07,100
So you have to do all that instance creation,

64
00:03:07,100 --> 00:03:08,920
that instance management,

65
00:03:08,920 --> 00:03:12,870
and also the installation of all that software.

66
00:03:12,870 --> 00:03:15,270
And if you're running your own data center,

67
00:03:15,270 --> 00:03:16,840
that of course, means that you need

68
00:03:16,840 --> 00:03:19,250
to manage that entire data center

69
00:03:19,250 --> 00:03:22,300
and prepare everything therefore, Kubernetes.

70
00:03:22,300 --> 00:03:24,600
If you are using a cloud provider,

71
00:03:24,600 --> 00:03:26,970
it also means that you need to create,

72
00:03:26,970 --> 00:03:29,010
for example, with AWS,

73
00:03:29,010 --> 00:03:31,270
all the EC2 instances you need

74
00:03:31,270 --> 00:03:33,410
for the worker and master nodes

75
00:03:33,410 --> 00:03:35,400
and that you then also might need

76
00:03:35,400 --> 00:03:39,470
to create additional resources like a load balancer,

77
00:03:39,470 --> 00:03:43,621
or a file systems like the Elastic File System,

78
00:03:43,621 --> 00:03:48,621
AWS offers if your dockerized application would need that.

79
00:03:48,690 --> 00:03:50,370
And that, of course, brings us back

80
00:03:50,370 --> 00:03:54,300
to the manual deployment part which is exactly

81
00:03:54,300 --> 00:03:56,223
what we didn't want to do.

82
00:03:57,100 --> 00:04:01,310
Because with that we are facing various disadvantages.

83
00:04:01,310 --> 00:04:03,620
We have to keep these instances,

84
00:04:03,620 --> 00:04:05,290
these machines updated,

85
00:04:05,290 --> 00:04:07,250
keep the operating system updated,

86
00:04:07,250 --> 00:04:10,980
and manage the entire network security group stuff.

87
00:04:10,980 --> 00:04:14,780
So we have to ensure the security of these instances

88
00:04:14,780 --> 00:04:17,079
and of all these machines.

89
00:04:17,079 --> 00:04:18,350
And in addition,

90
00:04:18,350 --> 00:04:20,920
as mentioned in the last course module,

91
00:04:20,920 --> 00:04:24,270
we might face even more problems when it then comes

92
00:04:24,270 --> 00:04:27,483
to replacing failing containers and so on.

93
00:04:28,540 --> 00:04:31,750
Well, the good news is these problems are exactly

94
00:04:31,750 --> 00:04:33,850
what Kubernetes does takes care of.

95
00:04:33,850 --> 00:04:36,330
I mentioned this in the last core section

96
00:04:36,330 --> 00:04:38,640
and this is still true.

97
00:04:38,640 --> 00:04:40,340
Now when it comes to the security

98
00:04:40,340 --> 00:04:42,550
and managing these machines,

99
00:04:42,550 --> 00:04:45,840
these instances and managing the operating system on therein

100
00:04:45,840 --> 00:04:47,960
and keeping everything up to date,

101
00:04:47,960 --> 00:04:51,120
that is something Kubernetes can't help you with

102
00:04:51,120 --> 00:04:54,190
because it's not a Server Administration tool,

103
00:04:54,190 --> 00:04:57,500
it's not a cloud provider and it's not a managed service

104
00:04:57,500 --> 00:05:00,020
that would take that away from you.

105
00:05:00,020 --> 00:05:04,550
It really just helps you with what happens on these servers.

106
00:05:04,550 --> 00:05:08,930
So Kubernetes will actually help you create the pods

107
00:05:08,930 --> 00:05:11,230
and run the containers in the pods,

108
00:05:11,230 --> 00:05:13,800
it will help you monitor and replace them

109
00:05:13,800 --> 00:05:15,960
and it will help you with scaling.

110
00:05:15,960 --> 00:05:19,210
In the end, you could say Kubernetes will simply utilize

111
00:05:19,210 --> 00:05:21,110
the resources you create,

112
00:05:21,110 --> 00:05:23,430
so it will utilize the worker nodes,

113
00:05:23,430 --> 00:05:25,820
these machines you are creating,

114
00:05:25,820 --> 00:05:28,980
and it will then help you achieve your deployment goals

115
00:05:28,980 --> 00:05:30,440
for the containers.

116
00:05:30,440 --> 00:05:33,760
It will not create the resources for you though,

117
00:05:33,760 --> 00:05:36,510
that is something you still have to do.

118
00:05:36,510 --> 00:05:39,620
Now, if you are an experienced server administrator,

119
00:05:39,620 --> 00:05:41,690
you can of course do all of that.

120
00:05:41,690 --> 00:05:45,650
If you're not there are additional tools like Kubermatic

121
00:05:45,650 --> 00:05:47,730
which is built for Kubernetes,

122
00:05:47,730 --> 00:05:50,850
but not part of Kubernetes which can help you

123
00:05:50,850 --> 00:05:54,430
with creating all the infrastructure you need

124
00:05:54,430 --> 00:05:57,250
for your Kubernetes managed to deployment

125
00:05:57,250 --> 00:06:00,400
and therefore, this could be an additional tool

126
00:06:00,400 --> 00:06:03,070
which helps you create these remote machines

127
00:06:03,070 --> 00:06:04,480
and these instances,

128
00:06:04,480 --> 00:06:06,850
for example, on AWS.

129
00:06:06,850 --> 00:06:08,580
So that's a tool which can help you

130
00:06:08,580 --> 00:06:11,440
if you don't wanna create everything manually there.

131
00:06:11,440 --> 00:06:13,940
So that could be a step in the right direction.

132
00:06:13,940 --> 00:06:16,630
It's not part of Kubernetes itself, though,

133
00:06:16,630 --> 00:06:18,620
because Kubernetes is really just

134
00:06:18,620 --> 00:06:20,510
about managing these containers

135
00:06:20,510 --> 00:06:23,970
and keeping your application up and running and scaling it.

136
00:06:23,970 --> 00:06:26,743
It's really important to understand that difference.

137
00:06:27,680 --> 00:06:31,070
In addition, certain cloud providers like again,

138
00:06:31,070 --> 00:06:36,030
AWS do have dedicated services like in AWS,

139
00:06:36,030 --> 00:06:39,970
EKS, Elastic Kubernetes Service which actually helps you

140
00:06:39,970 --> 00:06:41,810
with that as well.

141
00:06:41,810 --> 00:06:43,970
That is a service which will allow you

142
00:06:43,970 --> 00:06:46,910
to bring your own Kubernetes configuration

143
00:06:46,910 --> 00:06:48,410
so that you don't have

144
00:06:48,410 --> 00:06:52,720
to use the AWS specific configuration as you did have

145
00:06:52,720 --> 00:06:56,600
to use with ECS but EKS.

146
00:06:56,600 --> 00:06:59,590
So this Elastic Kubernetes Service will

147
00:06:59,590 --> 00:07:02,510
then also set up all the resources needed

148
00:07:02,510 --> 00:07:05,230
by your Kubernetes configuration.

149
00:07:05,230 --> 00:07:07,420
So it's services like this

150
00:07:07,420 --> 00:07:10,490
or tools like Kubermatic which I just showed you,

151
00:07:10,490 --> 00:07:13,690
which can help you complete the picture,

152
00:07:13,690 --> 00:07:15,990
and which can therefore help you getting rid of

153
00:07:15,990 --> 00:07:20,120
that right side of this slide of the steps you have

154
00:07:20,120 --> 00:07:21,073
to take care of.

155
00:07:22,050 --> 00:07:23,940
I just want you to be aware of that

156
00:07:23,940 --> 00:07:25,750
because it's easy to think

157
00:07:25,750 --> 00:07:28,780
that Kubernetes will also create all these machines

158
00:07:28,780 --> 00:07:29,613
which it needs.

159
00:07:29,613 --> 00:07:32,453
And that Kubernetes will install the kubelets

160
00:07:32,453 --> 00:07:35,490
and the API server and the scheduler

161
00:07:35,490 --> 00:07:37,230
and all the things we talked

162
00:07:37,230 --> 00:07:41,910
about when we analyzed the master and worker nodes.

163
00:07:41,910 --> 00:07:43,840
And it's really important to understand

164
00:07:43,840 --> 00:07:45,730
that Kubernetes will not do that.

165
00:07:45,730 --> 00:07:47,770
It will not create any machines

166
00:07:47,770 --> 00:07:52,150
or virtual instances and it will not install any software.

167
00:07:52,150 --> 00:07:56,050
It really will only take care about managing these pods

168
00:07:56,050 --> 00:07:58,540
and the containers in there monitoring them,

169
00:07:58,540 --> 00:08:01,630
it will take care about scaling and about ensuring

170
00:08:01,630 --> 00:08:04,090
that they can be accessed and reached.

171
00:08:04,090 --> 00:08:07,270
It will keep your application up and running.

172
00:08:07,270 --> 00:08:10,970
For creating the resources needed by your application,

173
00:08:10,970 --> 00:08:13,320
you either need to do that on your own,

174
00:08:13,320 --> 00:08:15,760
or you use a tool like Kubermatic

175
00:08:15,760 --> 00:08:18,850
or a managed service like EKS.

176
00:08:18,850 --> 00:08:22,500
And we will see that managed service in action later.

177
00:08:22,500 --> 00:08:23,550
For the moment,

178
00:08:23,550 --> 00:08:25,210
I just want you to be aware of this

179
00:08:25,210 --> 00:08:26,330
and for the moment,

180
00:08:26,330 --> 00:08:29,510
we'll set up a Kubernetes environment locally.

181
00:08:29,510 --> 00:08:33,169
So we'll set up a worker and master node locally

182
00:08:33,169 --> 00:08:34,039
and we'll ensure

183
00:08:34,039 --> 00:08:37,010
that we'll have all the software Kubernetes needs

184
00:08:37,010 --> 00:08:39,663
on these nodes installed locally.

