1
00:00:02,420 --> 00:00:04,400
So what do we need to install

2
00:00:04,400 --> 00:00:07,100
to get started with Kubernetes locally

3
00:00:07,100 --> 00:00:10,533
on our local machine for playing around with it?

4
00:00:11,540 --> 00:00:12,780
Well, we need to install

5
00:00:12,780 --> 00:00:16,160
what we need to install no matter where we wanna use it

6
00:00:16,160 --> 00:00:18,510
no matter if it's our local machine

7
00:00:18,510 --> 00:00:20,260
or some machine in the cloud

8
00:00:20,260 --> 00:00:22,720
or in our own data center.

9
00:00:22,720 --> 00:00:25,350
We definitely will need a cluster.

10
00:00:25,350 --> 00:00:28,430
A cluster with our master node

11
00:00:28,430 --> 00:00:31,170
in reality that master node might

12
00:00:31,170 --> 00:00:35,010
actually also be distributed across multiple machines

13
00:00:35,010 --> 00:00:37,940
to ensure it's always up and running

14
00:00:37,940 --> 00:00:39,480
because if it fails

15
00:00:39,480 --> 00:00:41,640
your entire cluster will have a problem

16
00:00:41,640 --> 00:00:45,060
but to keep it simple we need one virtual instance

17
00:00:45,060 --> 00:00:47,120
one machine running in a cluster

18
00:00:47,120 --> 00:00:49,420
which has that master node set up

19
00:00:49,420 --> 00:00:52,720
and we need one or more worker nodes.

20
00:00:52,720 --> 00:00:55,110
And we don't just need these machines

21
00:00:55,110 --> 00:00:56,470
which then are empty

22
00:00:56,470 --> 00:00:59,190
but we also need to have all these software

23
00:00:59,190 --> 00:01:01,910
and all these services, which they need

24
00:01:01,910 --> 00:01:03,560
to be installed on them.

25
00:01:03,560 --> 00:01:04,959
So on the master node,

26
00:01:04,959 --> 00:01:08,020
the API server and schedulers should be installed

27
00:01:08,020 --> 00:01:09,650
and a couple of other things

28
00:01:09,650 --> 00:01:12,839
and on the worker node Docker should be installed

29
00:01:12,839 --> 00:01:14,790
the kubelets should be installed

30
00:01:14,790 --> 00:01:16,800
so there is communication device

31
00:01:16,800 --> 00:01:19,690
for talking to the master node and so on

32
00:01:19,690 --> 00:01:21,593
all of that needs to be installed.

33
00:01:22,570 --> 00:01:25,390
So that is something which we need to create

34
00:01:25,390 --> 00:01:29,080
and then we need another tool locally on our machine

35
00:01:29,080 --> 00:01:34,080
and that's the kubectl or kube-control tool.

36
00:01:34,810 --> 00:01:38,270
The kubectl tool is actually a tool

37
00:01:38,270 --> 00:01:39,630
which you then use

38
00:01:39,630 --> 00:01:42,740
to send instructions to the cluster

39
00:01:42,740 --> 00:01:45,820
for example, to create a new deployment,

40
00:01:45,820 --> 00:01:50,190
delete a deployment or change our running deployment.

41
00:01:50,190 --> 00:01:52,090
With the kubectl tool

42
00:01:52,090 --> 00:01:54,930
you as the developer and administrator

43
00:01:54,930 --> 00:01:56,780
are able to send instructions

44
00:01:56,780 --> 00:02:00,040
to the master node in the end which then will do

45
00:02:00,040 --> 00:02:03,240
whatever it needs to do with the worker nodes.

46
00:02:03,240 --> 00:02:05,800
For example, if you sent the instruction

47
00:02:05,800 --> 00:02:08,830
to create more Pods of a given container

48
00:02:08,830 --> 00:02:11,520
so more instances of a given container

49
00:02:11,520 --> 00:02:14,900
the master node will then interact with the worker nodes

50
00:02:14,900 --> 00:02:18,690
such that these extra Pods are created.

51
00:02:18,690 --> 00:02:23,360
So this is how you actually set or change the configuration

52
00:02:23,360 --> 00:02:27,550
which then should be maintained by Kubernetes.

53
00:02:27,550 --> 00:02:30,680
So the cluster is the technical infrastructure

54
00:02:30,680 --> 00:02:34,750
the kubectl tool is your communication device

55
00:02:34,750 --> 00:02:37,400
for talking with that infrastructure

56
00:02:37,400 --> 00:02:40,520
and for talking with this Kubernetes set up.

57
00:02:40,520 --> 00:02:44,440
Don't confuse the kubectl tool with the API server

58
00:02:44,440 --> 00:02:46,220
or with the master node.

59
00:02:46,220 --> 00:02:49,730
The master node is really the thing in your cluster

60
00:02:49,730 --> 00:02:53,420
which then basically applies your commands

61
00:02:53,420 --> 00:02:57,690
and ensures that your commands are executed correctly.

62
00:02:57,690 --> 00:03:00,660
The kubectl tool is really just a thing

63
00:03:00,660 --> 00:03:03,420
with which you give the commands.

64
00:03:03,420 --> 00:03:06,210
You could compare this, even though I will admit

65
00:03:06,210 --> 00:03:07,830
that it's kind of a strange example

66
00:03:07,830 --> 00:03:09,990
but you could compare this with

67
00:03:09,990 --> 00:03:12,630
let's say the president of the United States

68
00:03:12,630 --> 00:03:14,310
who is the Commander-in-Chief

69
00:03:14,310 --> 00:03:16,230
and who could give the command

70
00:03:16,230 --> 00:03:19,090
that whatever country you should be attacked

71
00:03:19,090 --> 00:03:21,630
and yes, I know it's a stupid example

72
00:03:21,630 --> 00:03:23,980
but let's say that is what the president does

73
00:03:23,980 --> 00:03:27,200
then you would have generals in the army

74
00:03:27,200 --> 00:03:29,380
with soldiers below them

75
00:03:29,380 --> 00:03:30,580
who execute that command

76
00:03:31,500 --> 00:03:33,390
and it would be the duty of the generals

77
00:03:33,390 --> 00:03:35,730
to ensure that the command of the president

78
00:03:35,730 --> 00:03:37,700
is executed correctly.

79
00:03:37,700 --> 00:03:40,060
So kubectl would be the president

80
00:03:40,060 --> 00:03:42,020
the master node would be the general

81
00:03:42,020 --> 00:03:45,170
and the worker nodes would be the soldiers.

82
00:03:45,170 --> 00:03:47,620
And please excuse the strange analogy

83
00:03:47,620 --> 00:03:50,990
but I hope it's now clear how these things work together

84
00:03:52,190 --> 00:03:54,910
and therefore that is what we need to set up.

85
00:03:54,910 --> 00:03:57,130
And if we would set this up in a cloud

86
00:03:57,130 --> 00:03:59,080
or in our own data center

87
00:03:59,080 --> 00:04:02,070
then the cluster would be what happens in the cloud

88
00:04:02,070 --> 00:04:05,010
or in the data center and kubectl is a tool

89
00:04:05,010 --> 00:04:07,323
which we install locally on our machine.

90
00:04:08,300 --> 00:04:11,330
Now for testing and for playing around with that

91
00:04:11,330 --> 00:04:14,510
we will set up everything on our local machine

92
00:04:14,510 --> 00:04:16,560
so not just kubectl

93
00:04:16,560 --> 00:04:19,773
but also a demo, a dummy cluster.

94
00:04:20,829 --> 00:04:24,340
And for setting up this dummy cluster locally

95
00:04:24,340 --> 00:04:27,110
we can use a tool called minikube

96
00:04:27,110 --> 00:04:30,480
and attached you find a link with setup instructions

97
00:04:30,480 --> 00:04:32,610
though we will set it up together

98
00:04:32,610 --> 00:04:34,513
over this in the next lectures.

99
00:04:35,388 --> 00:04:37,550
Minikube is in the end a tool

100
00:04:37,550 --> 00:04:39,230
which you can install locally

101
00:04:39,230 --> 00:04:42,490
for playing around with Kubernetes and for testing it

102
00:04:42,490 --> 00:04:45,820
and it will use a virtual machine on your laptop

103
00:04:45,820 --> 00:04:48,150
on your machine, on your local machine

104
00:04:48,150 --> 00:04:50,570
to create the cluster in there.

105
00:04:50,570 --> 00:04:54,000
So it simulates another machine on your machine

106
00:04:54,000 --> 00:04:55,950
by using such a virtual machine

107
00:04:56,900 --> 00:05:00,450
and the this virtual machine then holds this cluster.

108
00:05:00,450 --> 00:05:03,600
It will actually create a single node cluster

109
00:05:03,600 --> 00:05:06,570
which means there the worker and master node

110
00:05:06,570 --> 00:05:10,300
is combined into one single virtual machine

111
00:05:10,300 --> 00:05:12,770
not something you would do in production

112
00:05:12,770 --> 00:05:15,500
but something we can absolutely do during development

113
00:05:15,500 --> 00:05:18,830
to keep things easy and resource friendly.

114
00:05:18,830 --> 00:05:21,310
Now, minikube is a great tool

115
00:05:21,310 --> 00:05:23,110
for getting started with Kubernetes

116
00:05:23,110 --> 00:05:25,410
and for testing things locally

117
00:05:26,840 --> 00:05:28,970
and the great thing is that you can install it

118
00:05:28,970 --> 00:05:32,800
on Linux, macOS and Windows.

119
00:05:32,800 --> 00:05:34,820
And again, you attached find a link

120
00:05:34,820 --> 00:05:38,380
with setup instructions for all three systems

121
00:05:38,380 --> 00:05:41,430
though I will walk through macOS and Windows

122
00:05:41,430 --> 00:05:42,363
together with you.

123
00:05:43,630 --> 00:05:45,790
It's also worth mentioning that minikube

124
00:05:46,880 --> 00:05:51,270
will not replace the kubectl command or tool

125
00:05:51,270 --> 00:05:53,000
which you also need to install.

126
00:05:53,000 --> 00:05:56,590
You always need to kubectl command locally

127
00:05:56,590 --> 00:06:00,600
even if you don't use minikube because that is the tool

128
00:06:00,600 --> 00:06:03,430
you use for communicating with your cluster

129
00:06:03,430 --> 00:06:06,490
no matter if it's a minikube cluster locally

130
00:06:06,490 --> 00:06:09,357
or your cloud cluster running on AWS.

131
00:06:10,760 --> 00:06:13,850
And therefore we'll actually install two things

132
00:06:13,850 --> 00:06:15,876
we'll install kubectl,

133
00:06:15,876 --> 00:06:17,880
and then we'll install minikube

134
00:06:17,880 --> 00:06:21,280
and we'll start with that in the next lecture on macOS

135
00:06:21,280 --> 00:06:23,933
and in the lecture thereafter on Windows.

