1
00:00:04,410 --> 00:00:10,050
And now let's try to connect to our deployment using this service.

2
00:00:10,620 --> 00:00:19,110
Let's grab this cluster IP and let's first try to connect to this cluster IP address from our local

3
00:00:19,110 --> 00:00:28,320
computer, see URL and paste this IP address and after called let's also add port which we exposed.

4
00:00:28,350 --> 00:00:34,740
It is external port for our deployment internally it will be proxy to port 80 on each container.

5
00:00:34,770 --> 00:00:37,980
Let's try whether this works on our local computer or not.

6
00:00:38,370 --> 00:00:41,010
C url and I see no response.

7
00:00:41,190 --> 00:00:43,140
That's what I just told you.

8
00:00:43,170 --> 00:00:49,710
Cluster IP address is not available outside of the Kubernetes cluster.

9
00:00:50,540 --> 00:00:52,670
This behavior of the cluster?

10
00:00:52,670 --> 00:01:00,230
IPI It is just internally available IP address, but you are able to access cluster IP from any node.

11
00:01:00,230 --> 00:01:01,580
And let's try that.

12
00:01:01,850 --> 00:01:09,950
Let's say to our node, let me go back to this command as a sage docker and the IP address of the Node

13
00:01:10,250 --> 00:01:11,570
DC user.

14
00:01:11,690 --> 00:01:15,920
And let's now try to connect to cluster IP from the node.

15
00:01:15,920 --> 00:01:21,410
And here again, let's specify a port 88 and I see a result.

16
00:01:21,410 --> 00:01:22,990
Welcome to again X.

17
00:01:24,500 --> 00:01:30,290
And this response was provided by one of the posts in the deployment.

18
00:01:31,370 --> 00:01:38,960
Of course, now from this output, I am not able to recognize which port exactly answered me, but this

19
00:01:38,960 --> 00:01:43,160
answer was provided by one of the ports in the deployment.

20
00:01:44,390 --> 00:01:50,600
I could try again, again, again, and I get answer from the ports in the deployment.

21
00:01:50,930 --> 00:01:52,370
That's how it works.

22
00:01:52,490 --> 00:02:01,070
Cluster IP is just single IP, which was created as a service for a particular deployment, and you

23
00:02:01,070 --> 00:02:06,380
could utilize just a single IP in order to connect to any of the ports.

24
00:02:06,800 --> 00:02:13,100
And behind the scenes, Kubernetes does all processing of the request to particular selected port,

25
00:02:13,100 --> 00:02:17,810
and it balances a load across different ports in the deployment.

26
00:02:18,320 --> 00:02:18,950
All right.

27
00:02:18,950 --> 00:02:20,870
Let's close this connection.

28
00:02:20,870 --> 00:02:24,680
And let's now also read details about particular service.

29
00:02:25,010 --> 00:02:32,840
We get that there is command K get CVC short version four, get services and here is name of the service

30
00:02:32,840 --> 00:02:34,520
which we created before.

31
00:02:34,700 --> 00:02:38,480
Let's take this name and right now k describe.

32
00:02:39,160 --> 00:02:46,330
Service and name of the service we would like to get the details about here with Gloucester IP, which

33
00:02:46,330 --> 00:02:49,840
we just used in order to connect to this service.

34
00:02:50,260 --> 00:02:56,950
Also there was external port and here was target port and here are three different end points.

35
00:02:57,430 --> 00:03:05,980
Those end points indicate particular ports which are used for connections to this particular cluster

36
00:03:05,980 --> 00:03:06,730
IP.

37
00:03:06,910 --> 00:03:11,380
So load will be balanced across those three different ports.

38
00:03:11,920 --> 00:03:19,750
And notice everywhere here port eight, it is target port for our service, the aid, this default port

39
00:03:19,750 --> 00:03:21,940
where engine etc. is running.

40
00:03:22,180 --> 00:03:33,880
So 88 and 80 also here you see type of the service cluster IP and selector here is also present up equals

41
00:03:33,880 --> 00:03:35,860
sign and Jennings deployment.

42
00:03:36,100 --> 00:03:41,530
And that's how this service is actually connected to particular ports.

43
00:03:41,710 --> 00:03:50,740
All those ports also have particular label up and deployment and this label was created by Kubernetes

44
00:03:50,740 --> 00:03:51,510
automatically.

45
00:03:51,520 --> 00:03:58,030
We did not specify it because we just created the deployment using Create Deployment Command and we

46
00:03:58,030 --> 00:04:00,910
created a service using exposed command.

47
00:04:01,810 --> 00:04:08,830
Namespace here is default, same as for ports and deployment, which is called engine deployment.

48
00:04:09,760 --> 00:04:10,480
All right.

49
00:04:10,510 --> 00:04:13,000
That's it for this service.

50
00:04:13,000 --> 00:04:16,870
And we exposed our deployment using cluster IP.

51
00:04:16,870 --> 00:04:21,279
And cluster IP is only available inside of the Cuban in this cluster.

