WEBVTT - This file was automatically generated by VIMEO

0
00:00:07.500 --> 00:00:10.500
In this video, I will introduce you to Containers how they

1
00:00:10.500 --> 00:00:12.800
 work and why you want to manage them with an orchestrator.

2
00:00:14.200 --> 00:00:18.000
If you're not using containers now you soon will be containers are

3
00:00:17.200 --> 00:00:20.100
 the preferred way to deliver software, especially in

4
00:00:20.100 --> 00:00:23.600
 the cloud wire contains preferred you ask because they

5
00:00:23.600 --> 00:00:26.900
 solve it works on my computer Fiasco containers

6
00:00:26.900 --> 00:00:29.300
 allow you to package an application and all its dependencies

7
00:00:29.300 --> 00:00:32.200
 into a portable artifact called an image that you

8
00:00:32.200 --> 00:00:33.700
 can easily distribute and run.

9
00:00:34.500 --> 00:00:37.400
This image is constructed from a text file usually called

10
00:00:37.400 --> 00:00:40.200
 a Docker file that describes the commands and steps

11
00:00:40.200 --> 00:00:41.200
 needed to assemble the image.

12
00:00:43.500 --> 00:00:46.200
Here, we have an example of a simple Docker file

13
00:00:46.200 --> 00:00:49.500
 that builds a rust container that you could use for development or

14
00:00:49.500 --> 00:00:50.900
 in a ci/cd pipeline.

15
00:00:51.700 --> 00:00:54.100
Obviously there's a lot going on in this file, but the key

16
00:00:54.100 --> 00:00:54.700
 points are.

17
00:00:55.500 --> 00:00:58.300
From envy and run directives shown

18
00:00:58.300 --> 00:01:01.400
 here in bold. The from is used to pick a base image

19
00:01:01.400 --> 00:01:03.100
 that your current one will be built on top of

20
00:01:04.200 --> 00:01:06.400
in this example, Debian Lennox

21
00:01:06.900 --> 00:01:09.800
The EnV directive is where you can set environment variables

22
00:01:09.800 --> 00:01:11.700
 like path as in our example here.

23
00:01:12.800 --> 00:01:15.200
The Run syntax is used to issue commands that

24
00:01:15.200 --> 00:01:17.700
 can be executed inside the container during building.

25
00:01:18.500 --> 00:01:21.800
In our case, it is installing some packages using the APT

26
00:01:21.800 --> 00:01:22.500
 package manager.

27
00:01:24.300 --> 00:01:27.600
containers work by using a Linux technology called OS level

28
00:01:27.600 --> 00:01:28.400
 virtualization

29
00:01:29.300 --> 00:01:32.300
OS level virtualization is made possible by using two

30
00:01:32.300 --> 00:01:34.700
 kernel features called namespaces and c groups.

31
00:01:35.400 --> 00:01:39.700
These limit what a container can see and use on a host namespaces

32
00:01:38.700 --> 00:01:41.600
 restrict global system resources

33
00:01:41.600 --> 00:01:43.900
 like networks and file systems for container.

34
00:01:45.300 --> 00:01:48.100
by restricting resources a container's isolated from the

35
00:01:48.100 --> 00:01:48.900
 host OS

36
00:01:49.700 --> 00:01:52.400
cgroups manage and measure the resources of container

37
00:01:52.400 --> 00:01:55.400
 can use they allow you to set resource limitations like

38
00:01:55.400 --> 00:01:58.400
 memory CPU and prioritization for

39
00:01:58.400 --> 00:01:59.000
 processes.

40
00:01:59.900 --> 00:02:02.600
The main point to remember is that name spaces

41
00:02:02.600 --> 00:02:05.600
 limit what a container can see while cgroups limit

42
00:02:05.600 --> 00:02:08.700
 what a container can use without these features containers

43
00:02:08.700 --> 00:02:11.500
 would not be secure bounded or much use.

44
00:02:13.500 --> 00:02:16.600
Container makes applications portable and consistent but

45
00:02:16.600 --> 00:02:19.500
 it's only one piece of modern infrastructure. You might

46
00:02:19.500 --> 00:02:22.000
 be thinking containers sound amazing. I want to

47
00:02:22.200 --> 00:02:25.400
 run all my apps on them. But managing many containers running

48
00:02:25.400 --> 00:02:28.700
 on different hosts using different network ports and

49
00:02:28.700 --> 00:02:30.500
 shared volumes can be a nightmare.

50
00:02:31.100 --> 00:02:34.400
What if one container stops? How do you scale containers

51
00:02:34.400 --> 00:02:35.100
 under load?

52
00:02:35.800 --> 00:02:38.100
How do you force containers to run in different hosts for

53
00:02:38.100 --> 00:02:42.100
 high availability? Well, that is why we have container orchestration

54
00:02:41.100 --> 00:02:45.100
 in the Container orchestration Wars kubernetes

55
00:02:44.100 --> 00:02:47.700
 or k-8s is the Undisputed King

56
00:02:47.700 --> 00:02:50.500
 kubernetes is open source and comes preloaded

57
00:02:50.500 --> 00:02:53.800
 with some useful patterns such as networking role-based access

58
00:02:53.800 --> 00:02:55.600
 control and versioned apis.

59
00:02:56.200 --> 00:02:59.500
You can think of it as low level PCB infrastructure just like

60
00:02:59.500 --> 00:03:00.200
 Linux.

61
00:03:00.800 --> 00:03:03.200
Containers run in pods that are managed by

62
00:03:03.200 --> 00:03:06.100
 the case control plane. You can expose pods to

63
00:03:06.100 --> 00:03:09.200
 a Cades cluster or to the Internet by using what is called

64
00:03:09.200 --> 00:03:09.700
 a service.

65
00:03:10.800 --> 00:03:13.300
Another great feature of kubernetes is that you can group

66
00:03:13.300 --> 00:03:16.400
 pods together in a deployment that is monitored and will

67
00:03:16.400 --> 00:03:19.300
 automatically recover. If one or many of those pods die.

68
00:03:20.100 --> 00:03:23.400
In this video we learned about containers and why

69
00:03:23.400 --> 00:03:26.600
 they are the preferred method of delivery. I talked about OS level

70
00:03:26.600 --> 00:03:29.500
 virtualization which uses namespaces and see groups

71
00:03:29.500 --> 00:03:32.000
 to make containers work. You will also introduced to

72
00:03:32.300 --> 00:03:35.500
 the complexities of running containers at scale and how that is remedied

73
00:03:35.500 --> 00:03:37.600
 by using an orchestrated like kubernetes.

74
00:03:38.400 --> 00:03:41.400
Finally we discussed some kubernetes features like being open

75
00:03:41.400 --> 00:03:43.800
 source pods and networking management.

76
00:03:44.700 --> 00:03:47.700
I have only scratched the surface here on containers and kubernetes,

77
00:03:47.700 --> 00:03:50.300
 please Explore More to build upon this knowledge.

78
00:03:51.800 --> 00:03:54.600
In this next video, we will switch gears and

79
00:03:54.600 --> 00:03:55.800
 discuss cloud computing.
