1
00:00:01,684 --> 00:00:04,500
So we got our cluster and we are able

2
00:00:04,500 --> 00:00:06,660
to use cube control with it.

3
00:00:06,660 --> 00:00:08,830
One important thing is missing though.

4
00:00:08,830 --> 00:00:12,430
We got the general cluster network and so on,

5
00:00:12,430 --> 00:00:16,120
but the concrete worker nodes are missing.

6
00:00:16,120 --> 00:00:19,530
And to add them, go to the compute section here

7
00:00:19,530 --> 00:00:23,760
on your cluster and add a node group, click on,

8
00:00:23,760 --> 00:00:27,940
Add node croup and give this node group a name,

9
00:00:27,940 --> 00:00:30,680
for example, demo depth nodes.

10
00:00:30,680 --> 00:00:32,493
But this name is totally up to you.

11
00:00:33,740 --> 00:00:36,950
Next we need to add an IAM role.

12
00:00:36,950 --> 00:00:39,960
And we did this earlier already, for the cluster

13
00:00:39,960 --> 00:00:43,720
to define what the cluster may do on our behalf.

14
00:00:43,720 --> 00:00:46,410
Now we need to do something similar again,

15
00:00:46,410 --> 00:00:49,380
this time however, for the nodes,

16
00:00:49,380 --> 00:00:53,190
because you have to keep in mind that the cluster needed

17
00:00:53,190 --> 00:00:57,050
certain permissions to do some stuff behind the scenes,

18
00:00:57,050 --> 00:00:59,180
the nodes, the worker nodes,

19
00:00:59,180 --> 00:01:02,380
which are in the end EC2 instances

20
00:01:02,380 --> 00:01:04,450
also need certain permissions.

21
00:01:04,450 --> 00:01:07,850
For examples, so that they can write log files

22
00:01:07,850 --> 00:01:10,650
or connect to certain over services,

23
00:01:10,650 --> 00:01:12,970
which we might leverage in our code.

24
00:01:12,970 --> 00:01:16,920
And therefore we need to attach an IAM role

25
00:01:17,847 --> 00:01:21,280
to this node group and therefore to the EC2 instances,

26
00:01:21,280 --> 00:01:22,980
the remote machines,

27
00:01:22,980 --> 00:01:26,140
which will be launched in this node group.

28
00:01:26,140 --> 00:01:30,460
Now the launching will happen automatically managed by AWS,

29
00:01:30,460 --> 00:01:32,480
but we need to set up the permissions

30
00:01:32,480 --> 00:01:35,900
these instances will have, and for this again,

31
00:01:35,900 --> 00:01:40,900
open the IAM console in a new tab and create another role

32
00:01:42,700 --> 00:01:47,370
here, select EC2 on common use cases

33
00:01:47,370 --> 00:01:50,320
and click Next permissions.

34
00:01:50,320 --> 00:01:53,453
And now here are a couple of permissions you need to add,

35
00:01:54,290 --> 00:01:59,290
you should search for EKS here and then EKS worker

36
00:01:59,430 --> 00:02:02,980
and add this EKS worker node policy,

37
00:02:02,980 --> 00:02:05,990
which holds a couple of permissions worker nodes,

38
00:02:05,990 --> 00:02:09,363
which is in the end, what we're going to start here, neat.

39
00:02:11,300 --> 00:02:16,300
Also this CNI policy by searching for a CNI.

40
00:02:17,670 --> 00:02:22,670
And add the ECQ container registry read only policy.

41
00:02:25,610 --> 00:02:29,020
Now these are free policies with a bunch of permissions,

42
00:02:29,020 --> 00:02:32,430
which allow these nodes, these EC2 instances,

43
00:02:32,430 --> 00:02:35,990
which are part of our cluster to do various things,

44
00:02:35,990 --> 00:02:39,430
which they need to do in order to pull images

45
00:02:39,430 --> 00:02:41,083
and to run successfully.

46
00:02:42,010 --> 00:02:44,870
Once you added these free policies,

47
00:02:44,870 --> 00:02:48,660
click on Next tax and Next review,

48
00:02:48,660 --> 00:02:51,170
make sure the free policies are there

49
00:02:51,170 --> 00:02:55,553
and give this role a name like EKS node group,

50
00:02:57,040 --> 00:02:58,670
something like this.

51
00:02:58,670 --> 00:03:01,670
Once you debt click Create role.

52
00:03:01,670 --> 00:03:02,710
And once that is done,

53
00:03:02,710 --> 00:03:06,870
you can close that IAM console and then click

54
00:03:06,870 --> 00:03:09,100
the Refresh button here in your cluster

55
00:03:09,100 --> 00:03:11,440
node group configuration screen,

56
00:03:11,440 --> 00:03:14,533
and then pick this newly created node group here.

57
00:03:16,700 --> 00:03:20,380
With that done you can leave all the other defaults

58
00:03:20,380 --> 00:03:21,743
and click Next.

59
00:03:22,940 --> 00:03:24,010
Now on this page,

60
00:03:24,010 --> 00:03:28,100
you control which kind of EC2 instances will be launched

61
00:03:28,100 --> 00:03:32,630
and managed by AWS on your behalf.

62
00:03:32,630 --> 00:03:35,650
You can keep the default image here

63
00:03:35,650 --> 00:03:37,300
for the operating system,

64
00:03:37,300 --> 00:03:41,460
but for the instance type I'm going to use t3 micro,

65
00:03:41,460 --> 00:03:44,720
which is simply a cheaper instance,

66
00:03:44,720 --> 00:03:47,969
actually make sure you use t3 small

67
00:03:47,969 --> 00:03:51,470
as a minimum here, not micro.

68
00:03:51,470 --> 00:03:54,300
Scheduling ports on micro can fail

69
00:03:54,300 --> 00:03:56,120
and your application can end up

70
00:03:56,120 --> 00:03:58,310
in a pending state, therefore.

71
00:03:58,310 --> 00:04:00,360
So that's just an important node.

72
00:04:00,360 --> 00:04:04,640
Make sure you use the small instance as a minimum value

73
00:04:04,640 --> 00:04:08,290
here not micro, I picked micro here.

74
00:04:08,290 --> 00:04:11,250
I ran into errors and changed it behind the scenes later.

75
00:04:11,250 --> 00:04:15,410
So don't even go down that route, start with small.

76
00:04:15,410 --> 00:04:18,920
The larger the instance here, the more powerful it is,

77
00:04:18,920 --> 00:04:22,750
you can see the number of vertual CPU and memory here,

78
00:04:22,750 --> 00:04:24,940
but of course the more it will cost.

79
00:04:24,940 --> 00:04:28,440
So I will go for the cheapest one here, keep that default,

80
00:04:28,440 --> 00:04:33,440
disc size, and then you can control your scaling policy.

81
00:04:33,950 --> 00:04:37,110
Now, scaling is not something we will look into here,

82
00:04:37,110 --> 00:04:40,160
but I'm happy with starting two nodes

83
00:04:40,160 --> 00:04:41,800
and that's by the way important.

84
00:04:41,800 --> 00:04:44,130
Now we're talking about nodes here.

85
00:04:44,130 --> 00:04:48,140
Not ports, you can't have more than two ports,

86
00:04:48,140 --> 00:04:50,870
but the nodes are just the physical machines

87
00:04:50,870 --> 00:04:52,820
on which your ports run.

88
00:04:52,820 --> 00:04:56,570
With mini cube, we had just one dummy node

89
00:04:56,570 --> 00:04:59,000
in that virtual machine.

90
00:04:59,000 --> 00:05:03,670
Now we have two actual nodes, two different computers,

91
00:05:03,670 --> 00:05:07,530
different machines, so to say across which our ports

92
00:05:07,530 --> 00:05:09,399
and containers will be distributed

93
00:05:09,399 --> 00:05:12,190
automatically by Kubernetes.

94
00:05:12,190 --> 00:05:15,050
that's the part Kubernetes will take care of.

95
00:05:15,050 --> 00:05:18,320
It will start the ports, manage the ports

96
00:05:18,320 --> 00:05:20,893
and distribute them across these nodes.

97
00:05:21,750 --> 00:05:23,310
And the more nodes you have,

98
00:05:23,310 --> 00:05:26,830
the more space you have for the ports to be distributed

99
00:05:26,830 --> 00:05:30,170
so that if the ports on one node have a lot of work

100
00:05:30,170 --> 00:05:33,940
at the moment, new ports could be started on another node.

101
00:05:33,940 --> 00:05:37,020
But of course the more it will cost as well.

102
00:05:37,020 --> 00:05:40,070
So I will go with two nodes here for this demo

103
00:05:40,070 --> 00:05:41,560
and click Next.

104
00:05:41,560 --> 00:05:45,333
Now the settings here should all be fine.

105
00:05:46,320 --> 00:05:49,410
You can disable the remote access to nodes here,

106
00:05:49,410 --> 00:05:52,920
if you want to and I will, then you will not be able

107
00:05:52,920 --> 00:05:56,710
to connect to these nodes to the EC2 instances directly

108
00:05:56,710 --> 00:05:59,090
with SSH, but that's fine for me

109
00:05:59,090 --> 00:06:01,160
because I don't wanna connect anyways.

110
00:06:01,160 --> 00:06:04,800
I wanna let EKS manage my nodes for me,

111
00:06:04,800 --> 00:06:09,130
and therefore I will disable this enter, then click Next

112
00:06:09,130 --> 00:06:12,770
again, we can have another look at all our settings here

113
00:06:12,770 --> 00:06:14,393
and then click Create.

114
00:06:15,280 --> 00:06:19,300
And this will now spin up a couple of EC2 instances

115
00:06:19,300 --> 00:06:22,420
and add them to this cluster.

116
00:06:22,420 --> 00:06:25,150
And of course it will not just launch these instances,

117
00:06:25,150 --> 00:06:30,150
instead, EKS will also install all the Kubernetes software,

118
00:06:30,750 --> 00:06:34,530
which is required like to cube LEDs and cube proxy

119
00:06:34,530 --> 00:06:36,490
on these nodes.

120
00:06:36,490 --> 00:06:39,600
And it will add them all to this cluster network

121
00:06:39,600 --> 00:06:43,710
and do all the heavy lifting of wiring these things up.

122
00:06:43,710 --> 00:06:45,490
And that's the part you would have

123
00:06:45,490 --> 00:06:48,090
to do on your own manually, otherwise,

124
00:06:48,090 --> 00:06:50,990
here, we just specify how many nodes we want

125
00:06:50,990 --> 00:06:53,620
and they are launched and configured for us.

126
00:06:53,620 --> 00:06:56,150
And we don't need to worry about that.

127
00:06:56,150 --> 00:06:58,250
Now this will take a short while

128
00:06:58,250 --> 00:07:00,310
until this is all up and running,

129
00:07:00,310 --> 00:07:04,160
and therefore let's wait until this finished.

130
00:07:04,160 --> 00:07:07,090
And then let's see if we can successfully deploy

131
00:07:07,090 --> 00:07:10,560
our application here with these two Yamel files

132
00:07:10,560 --> 00:07:11,773
onto this cluster.

133
00:07:13,080 --> 00:07:16,168
Now, after a short while, couple of minutes,

134
00:07:16,168 --> 00:07:17,820
this should be active.

135
00:07:17,820 --> 00:07:22,000
Your node group should be active and you can, by the way,

136
00:07:22,000 --> 00:07:26,800
go to the EC2 service page in a new tab, for example,

137
00:07:26,800 --> 00:07:30,210
and you will see you're running EC2 instances here.

138
00:07:30,210 --> 00:07:33,830
These are the instances which were created for us

139
00:07:33,830 --> 00:07:36,640
automatically by EKS.

140
00:07:36,640 --> 00:07:41,020
And that's what I meant when I said that EKS will work

141
00:07:41,020 --> 00:07:43,488
together with other services,

142
00:07:43,488 --> 00:07:48,140
AWS offers in order to bring your EKS cluster to life.

143
00:07:48,140 --> 00:07:51,670
Here, for example, it launched EC2 instances,

144
00:07:51,670 --> 00:07:54,393
through the EC2 service for us.

145
00:07:55,810 --> 00:07:59,000
Whilst you're on that EC2 dashboard, by the way,

146
00:07:59,000 --> 00:08:01,080
also have a look at load balancers,

147
00:08:01,080 --> 00:08:05,110
and please node that you will not see any load balancers

148
00:08:05,110 --> 00:08:07,430
here at the moment.

149
00:08:07,430 --> 00:08:09,363
This will become important later.

150
00:08:10,760 --> 00:08:14,020
So let's close this and go back to our cluster.

151
00:08:14,020 --> 00:08:16,350
Now the cluster is up and running.

152
00:08:16,350 --> 00:08:18,910
It has a network setup for it,

153
00:08:18,910 --> 00:08:22,600
and it has nodes running in that network with all the

154
00:08:22,600 --> 00:08:25,420
Kurbenetes tools installed on them.

155
00:08:25,420 --> 00:08:28,190
And that is all we need to do.

156
00:08:28,190 --> 00:08:33,190
with this our cluster is set up and now it's like mini cube,

157
00:08:33,590 --> 00:08:36,690
just that it's not running in a virtual machine

158
00:08:36,690 --> 00:08:39,070
on our local system,

159
00:08:39,070 --> 00:08:42,309
but it now is a cluster to which we send commands

160
00:08:42,309 --> 00:08:44,360
with the cube control command

161
00:08:44,360 --> 00:08:46,593
just as we did it with mini cube.

