1
00:00:04,620 --> 00:00:05,400
Let's continue.

2
00:00:05,400 --> 00:00:11,530
And now let's modify type of the service which we create for our deployment, because now there was

3
00:00:11,530 --> 00:00:16,079
a cluster IP which is available only from inside of the cluster.

4
00:00:17,160 --> 00:00:22,350
Let's go here and let's delete the current service gate as well.

5
00:00:22,380 --> 00:00:22,990
Hello.

6
00:00:23,010 --> 00:00:25,110
Simply take its name.

7
00:00:26,070 --> 00:00:28,650
Let's clear terminal and enter key delete.

8
00:00:28,800 --> 00:00:31,560
SBC stands for service and paste.

9
00:00:31,590 --> 00:00:33,750
Name of the service we would like to delete.

10
00:00:34,380 --> 00:00:36,000
Service was deleted.

11
00:00:36,840 --> 00:00:37,410
As get.

12
00:00:38,070 --> 00:00:40,110
There was no such service anymore.

13
00:00:40,110 --> 00:00:47,640
And if I try to connect again to deployment using cluster IP which we used before, I will definitely

14
00:00:47,640 --> 00:00:48,480
get an error.

15
00:00:48,870 --> 00:00:50,670
So I see no response.

16
00:00:51,240 --> 00:00:51,810
Great.

17
00:00:52,290 --> 00:00:54,660
Let's now create service again.

18
00:00:54,660 --> 00:00:58,290
But now we will set its type to note port.

19
00:00:58,890 --> 00:01:06,260
Let's use same command k expose deployment gate as web.

20
00:01:06,270 --> 00:01:07,080
Hello.

21
00:01:07,170 --> 00:01:15,540
And here will be type which will be set to note port in Pascal case notation note port.

22
00:01:15,540 --> 00:01:23,430
And let's add here port option and port will be set to 3000 same port as we utilized before.

23
00:01:23,460 --> 00:01:30,050
It is that port where our containers actually run express node just application.

24
00:01:30,060 --> 00:01:37,530
Let's go ahead and create such service of type node port deployment was exposed let's list services

25
00:01:37,560 --> 00:01:47,190
K get SBC and now there was again service with name gate as web hello it's type now is node port here

26
00:01:47,190 --> 00:01:50,640
was again cluster IP and port.

27
00:01:50,730 --> 00:01:59,010
But here I see port which was specified here using port option and also after column I see randomly

28
00:01:59,010 --> 00:02:03,120
created port 32,142.

29
00:02:04,630 --> 00:02:11,560
And now I am able to connect to deployment using node IP address.

30
00:02:12,890 --> 00:02:16,910
I could get no IP address by entering mini cube IP.

31
00:02:17,390 --> 00:02:22,250
We have only a single node recap and here was its IP in my case.

32
00:02:22,250 --> 00:02:31,550
And I could take this IP, add this spot and I will connect to one of the ports in this deployment.

33
00:02:32,660 --> 00:02:33,690
Let's do that.

34
00:02:33,710 --> 00:02:35,510
Let me grab this IP.

35
00:02:35,540 --> 00:02:38,060
Go to Web browser, for example.

36
00:02:38,240 --> 00:02:42,620
Because now I will be able to connect to deployment from my computer.

37
00:02:42,650 --> 00:02:48,140
Let me paste this IP and after colon I will add this port.

38
00:02:48,380 --> 00:02:49,280
Like that.

39
00:02:50,060 --> 00:02:52,790
So in my case, connections to -- is here.

40
00:02:53,000 --> 00:02:54,860
So here was IP address.

41
00:02:54,890 --> 00:03:01,310
It is IP address of the node and here was randomly generated port, which was created by Kubernetes

42
00:03:01,310 --> 00:03:04,850
itself when we created a service for our deployment.

43
00:03:05,540 --> 00:03:10,610
Let's go ahead and try to connect and I see a response from one of the ports.

44
00:03:11,640 --> 00:03:12,870
Let's refresh.

45
00:03:13,350 --> 00:03:18,480
And I see response from our report with our name refresh again.

46
00:03:18,480 --> 00:03:21,240
And I see response from other port here.

47
00:03:21,720 --> 00:03:27,330
That's how we are able to connect to our deployment using node port service.

48
00:03:27,690 --> 00:03:35,010
Also, it is more simple way to get your URL for connection to this deployment by using mini cube.

49
00:03:35,010 --> 00:03:36,090
Service Command.

50
00:03:36,090 --> 00:03:36,930
Mini Cube.

51
00:03:37,860 --> 00:03:43,380
Series and hear the name of the service, in our case, gay aids web.

52
00:03:43,560 --> 00:03:44,250
Hello.

53
00:03:45,940 --> 00:03:52,990
Let's enter and new tab in the web browser will be opened automatically and notice your well here,

54
00:03:52,990 --> 00:03:59,560
same as a just used before IP address of the node and port, which was automatically generated by Kubernetes.

55
00:04:00,160 --> 00:04:03,520
That's node prototype of the service.

56
00:04:03,670 --> 00:04:10,720
Also here you could see this actual URL when you enter mini cube service eight as web.

57
00:04:10,720 --> 00:04:18,220
Hello, here was actual URL and if you want to get only URL, you could add here option this this URL.

58
00:04:19,329 --> 00:04:21,160
And you'll see only Earl.

59
00:04:21,160 --> 00:04:24,610
And you could grab it and paste it anywhere you want.

60
00:04:25,730 --> 00:04:28,760
So that's not broad service type.

61
00:04:29,210 --> 00:04:33,680
And it exposed the deployment at the port of the node.

62
00:04:33,680 --> 00:04:40,160
And here was this specific port in my example, in your case, this port will be completely different.

