1
00:00:04,530 --> 00:00:11,310
We could also very easily delete deployment and service, which we just created using just one command.

2
00:00:11,400 --> 00:00:12,300
Let's do that.

3
00:00:12,330 --> 00:00:15,090
Go to the terminal and here enter k.

4
00:00:15,180 --> 00:00:17,550
Delete this f.

5
00:00:17,700 --> 00:00:22,500
Here will the name of the first file deployment yaml.

6
00:00:22,500 --> 00:00:27,930
And here let's add this f option once again and type service dot yaml.

7
00:00:28,440 --> 00:00:32,009
Let's go ahead and delete both deployment and service.

8
00:00:32,490 --> 00:00:33,450
We'll check.

9
00:00:34,440 --> 00:00:35,940
Get get SVC.

10
00:00:36,300 --> 00:00:37,530
No service.

11
00:00:37,590 --> 00:00:41,250
Get get deployment and load deployment.

12
00:00:42,060 --> 00:00:42,640
Great.

13
00:00:42,660 --> 00:00:44,910
Now let's do the following.

14
00:00:45,210 --> 00:00:51,540
Let's try to create two deployments and let's connect them with each other, because it's very common

15
00:00:51,540 --> 00:00:57,090
task when you want to connect different applications together, for example, connect front end to back

16
00:00:57,090 --> 00:01:00,780
end or connect backend to database service and so on.

17
00:01:01,650 --> 00:01:04,230
Therefore, now we will do following.

18
00:01:04,260 --> 00:01:05,610
Let me draw a picture.

19
00:01:05,820 --> 00:01:11,250
So similarly, as before, we will create web deployment and deploy it.

20
00:01:11,250 --> 00:01:19,260
There are our Node.js Express Web application and here let me type web like that.

21
00:01:19,260 --> 00:01:26,430
And also we will create one more deployment and we will name it and Gen X.

22
00:01:28,840 --> 00:01:38,800
This ingenious deployment will run basic and Gen X image with no adjustments, and this Gen X deployment

23
00:01:38,800 --> 00:01:42,910
will have corresponding service with cluster IP.

24
00:01:43,210 --> 00:01:47,620
So let me draw here a line and here will be a cluster IP.

25
00:01:49,590 --> 00:01:53,490
Let's start with capital C cluster IP like that.

26
00:01:53,850 --> 00:01:59,490
And those two deployments, of course, are allocated in the Kubernetes cluster.

27
00:01:59,550 --> 00:02:06,360
And this deployment will be also exposed, but it service will have type load balancer.

28
00:02:06,360 --> 00:02:13,770
It means that we will be able to connect to it from outside using load balancer as IP address.

29
00:02:13,830 --> 00:02:15,930
So here is a load balancer.

30
00:02:16,740 --> 00:02:20,880
Now inside of the web application, we will create two endpoints.

31
00:02:20,880 --> 00:02:27,920
First will be root endpoint same as before, which will return simply hello from the web server.

32
00:02:27,930 --> 00:02:35,040
And one more endpoint here will be, let's say in Genesis and one connection will be made to Engine

33
00:02:35,040 --> 00:02:35,580
X.

34
00:02:35,790 --> 00:02:46,290
We will connect to engine service by using cluster IP or you will see that using engine x service name.

35
00:02:47,910 --> 00:02:48,780
Like death.

36
00:02:48,810 --> 00:02:56,340
So for one deployment, we will connect to another deployment and get response from one of the ports

37
00:02:56,340 --> 00:02:59,550
which will be running engine X application.

38
00:03:01,290 --> 00:03:07,830
And afterwards we will return back result to the client with the contents which we received from the

39
00:03:07,830 --> 00:03:08,970
NGO and export.

40
00:03:09,660 --> 00:03:10,830
So that's the plan.

41
00:03:11,400 --> 00:03:18,240
And in such a way, we will actually connect to different deployments, web deployment and again, deployment.

42
00:03:18,960 --> 00:03:20,640
Let's get started with that.

