1
00:00:00,480 --> 00:00:04,540
Hello and welcome to this section on multi container pods.

2
00:00:04,560 --> 00:00:13,200
The idea of decoupling a large monolithic application into sub-components known as microservices enables

3
00:00:13,200 --> 00:00:21,670
us to develop and deploy a set of independent small and reusable code this architecture can then help

4
00:00:21,670 --> 00:00:31,300
us scale up down as well as modify each service as required as opposed to modifying the entire application

5
00:00:32,410 --> 00:00:40,340
however at times you may need two services to work together such as a web server and a logging service.

6
00:00:40,420 --> 00:00:45,490
You need one agent instance per web server instance paired together.

7
00:00:45,670 --> 00:00:52,750
You don't want to march and bloat the code of the two services as each of them target different functionalities

8
00:00:53,140 --> 00:01:00,600
and you'd still like them to be developed and deployed separately you only need the two functionality

9
00:01:00,600 --> 00:01:02,700
to work together.

10
00:01:02,700 --> 00:01:11,020
You need one agent per web server instance paired together that can scale up and down together and that

11
00:01:11,020 --> 00:01:17,560
is why you have multi-container pods that share the same lifecycle which means they are created together

12
00:01:17,770 --> 00:01:24,390
and destroyed together they share the same network space which means they can refer to each other as

13
00:01:24,400 --> 00:01:29,280
local host and they have access to the same storage volumes.

14
00:01:29,410 --> 00:01:36,880
This way you do not have to establish volume sharing or services between the pods to enable communication

15
00:01:37,150 --> 00:01:40,710
between them to create a multi container pod.

16
00:01:40,750 --> 00:01:44,950
Add the new container information to the pod definition file.

17
00:01:44,950 --> 00:01:50,890
Remember the container section under the spec section in a pod definition file is an array.

18
00:01:50,950 --> 00:01:56,550
And the reason it is an array is to allow multiple containers in a single pod.

19
00:01:56,620 --> 00:02:02,350
In this case we add a new container named log agent to our existing pod.

20
00:02:02,470 --> 00:02:04,630
Well that's it for this lecture.

21
00:02:04,630 --> 00:02:10,780
Head over to the coding exercises section and practice configuring multi container pods.

22
00:02:10,810 --> 00:02:12,370
See you in the next lecture.
