1
00:00:02,160 --> 00:00:04,640
So this was an important module.

2
00:00:04,640 --> 00:00:07,250
We got our hands dirty with Kubernetes

3
00:00:07,250 --> 00:00:10,670
and we first of all learned, what we need to set up,

4
00:00:10,670 --> 00:00:13,700
the cluster and the infrastructure for the cluster,

5
00:00:13,700 --> 00:00:15,360
the software on the cluster

6
00:00:15,360 --> 00:00:17,690
and what Kubernetes does will do.

7
00:00:17,690 --> 00:00:19,780
We also learned that there are tools

8
00:00:19,780 --> 00:00:22,030
that can help us with setting up the cluster.

9
00:00:22,030 --> 00:00:23,940
Locally that would be Minikube

10
00:00:23,940 --> 00:00:25,930
to give us this development environment

11
00:00:25,930 --> 00:00:27,580
and on a cloud provider,

12
00:00:27,580 --> 00:00:29,540
that's something we're going to explore later,

13
00:00:29,540 --> 00:00:31,513
we'll also have tools that help us.

14
00:00:32,409 --> 00:00:34,290
Now since we work locally,

15
00:00:34,290 --> 00:00:35,610
we started with creating

16
00:00:35,610 --> 00:00:37,900
such a local development environment

17
00:00:37,900 --> 00:00:41,380
with the help of Minikube to get a local cluster

18
00:00:41,380 --> 00:00:44,280
in a virtual machine, running on our local machine

19
00:00:44,280 --> 00:00:46,840
and we installed the Kube control tool,

20
00:00:46,840 --> 00:00:48,420
which we will always need,

21
00:00:48,420 --> 00:00:50,520
not just if we work locally,

22
00:00:50,520 --> 00:00:53,050
because that's our communication device

23
00:00:53,050 --> 00:00:56,750
for sending instructions to the Kubernetes cluster.

24
00:00:56,750 --> 00:00:59,170
Now we learned that Kubernetes works

25
00:00:59,170 --> 00:01:01,080
with so-called objects.

26
00:01:01,080 --> 00:01:03,660
So the different resources we have running

27
00:01:03,660 --> 00:01:08,010
in a Kubernetes clusters are in the end, all such objects.

28
00:01:08,010 --> 00:01:10,550
And we can create them in two different ways,

29
00:01:10,550 --> 00:01:13,470
imperatively or declaratively.

30
00:01:13,470 --> 00:01:15,500
Now with the imperative approach,

31
00:01:15,500 --> 00:01:20,380
we executed commands like, create deployment,

32
00:01:20,380 --> 00:01:23,080
giving it a name and specifying the image

33
00:01:23,080 --> 00:01:24,723
which should be used.

34
00:01:26,430 --> 00:01:27,810
Something like this.

35
00:01:27,810 --> 00:01:29,850
And this worked just fine.

36
00:01:29,850 --> 00:01:32,520
It just was quite a bunch of typing.

37
00:01:32,520 --> 00:01:35,090
Of course we did not just do this for deployments,

38
00:01:35,090 --> 00:01:38,630
but then for example, also to expose a deployment

39
00:01:38,630 --> 00:01:42,150
by creating a service where we then specify

40
00:01:42,150 --> 00:01:46,543
a port and also the type of service.

41
00:01:47,530 --> 00:01:49,820
These were the imperative commands we saw.

42
00:01:49,820 --> 00:01:52,760
And we did not just see the commands for creating things,

43
00:01:52,760 --> 00:01:55,700
but also for deleting or for setting a new image

44
00:01:55,700 --> 00:01:58,973
and therefore for updating currently running deployments.

45
00:01:59,820 --> 00:02:03,120
But then we also learned about the more modern

46
00:02:03,120 --> 00:02:07,510
and a bit more convenient declarative approach.

47
00:02:07,510 --> 00:02:09,850
There you write down your configuration

48
00:02:09,850 --> 00:02:13,640
in these YAML files and you then simply apply them

49
00:02:13,640 --> 00:02:17,280
with the Kube control tool and the apply command.

50
00:02:17,280 --> 00:02:21,040
And you can apply just one file, as you learned

51
00:02:21,040 --> 00:02:23,613
or also multiple files at once.

52
00:02:24,510 --> 00:02:27,240
And whenever you make a change to one of these files

53
00:02:27,240 --> 00:02:29,690
and you reapply it, the cool thing is,

54
00:02:29,690 --> 00:02:32,550
that only these parts will be changed automatically

55
00:02:32,550 --> 00:02:36,423
by Kubernetes on the running application in your cluster.

56
00:02:37,330 --> 00:02:40,080
Now you can also delete resources

57
00:02:40,080 --> 00:02:42,090
that were created based on files

58
00:02:42,090 --> 00:02:47,090
by using delete with the dash F option like this.

59
00:02:47,580 --> 00:02:49,040
And of course, you also learned

60
00:02:49,040 --> 00:02:52,200
that you can merge multiple definitions into one file,

61
00:02:52,200 --> 00:02:55,870
in case you don't want to manage multiple files

62
00:02:55,870 --> 00:02:59,732
and also to make it easy to see which services

63
00:02:59,732 --> 00:03:03,563
and deployments and maybe other resources belong together.

64
00:03:04,540 --> 00:03:06,330
Now, when it comes to these files,

65
00:03:06,330 --> 00:03:09,140
we had a look at how they are structured

66
00:03:09,140 --> 00:03:11,850
and what the different options do in here,

67
00:03:11,850 --> 00:03:14,588
how labels and selectors work together

68
00:03:14,588 --> 00:03:17,470
to connect different resources,

69
00:03:17,470 --> 00:03:20,200
how we define paths and containers,

70
00:03:20,200 --> 00:03:24,370
how we can control the health checks which are performed,

71
00:03:24,370 --> 00:03:29,120
how we can control when images are pulled and so on.

72
00:03:29,120 --> 00:03:33,310
And I also pointed you at the official API reference,

73
00:03:33,310 --> 00:03:35,290
which can be useful for finding out

74
00:03:35,290 --> 00:03:37,360
which options can be set

75
00:03:37,360 --> 00:03:40,500
and what these different options do.

76
00:03:40,500 --> 00:03:42,520
Though, I also of course mentioned

77
00:03:42,520 --> 00:03:45,580
that many of these options will rarely be needed.

78
00:03:45,580 --> 00:03:48,390
So don't be overwhelmed by the long list

79
00:03:48,390 --> 00:03:52,620
of options that can be set on certain objects.

80
00:03:52,620 --> 00:03:53,570
And with that,

81
00:03:53,570 --> 00:03:56,710
we get all the important Kubernetes basics down.

82
00:03:56,710 --> 00:03:58,230
We know the big picture

83
00:03:58,230 --> 00:04:00,730
and the general architecture or philosophy

84
00:04:00,730 --> 00:04:05,010
behind Kubernetes, but then even more important than that,

85
00:04:05,010 --> 00:04:09,120
we also now know how to work with this architecture

86
00:04:09,120 --> 00:04:12,240
and how to bring this big picture to life.

87
00:04:12,240 --> 00:04:15,080
So now we'll dig deeper into Kubernetes

88
00:04:15,080 --> 00:04:17,589
and have a look at a couple of key problems

89
00:04:17,589 --> 00:04:20,529
which you'll face in almost any application,

90
00:04:20,529 --> 00:04:24,233
so that you're also prepared to build such applications.

