1 00:00:01,350 --> 00:00:05,400 Now that we've taken a look at a note port service we're going to start to take a look at cluster IP 2 00:00:05,400 --> 00:00:06,480 as well. 3 00:00:06,510 --> 00:00:14,110 Remember that the goal of a cluster IP service is to expose a pod to other pods inside the cluster to 4 00:00:14,110 --> 00:00:15,610 better explore a cluster IP. 5 00:00:15,610 --> 00:00:20,030 I want to give you a quick reminder on how parts of our application are working right now. 6 00:00:20,080 --> 00:00:22,210 The president we've got that post project. 7 00:00:22,210 --> 00:00:27,430 Anytime someone tries to create a post we are sending a request over to the event bus and the event 8 00:00:27,430 --> 00:00:33,070 bus hopefully is going to emit that event or kind of broadcast that event to everything else inside 9 00:00:33,070 --> 00:00:41,150 of rap including back over to post so let's try to create a new pod that is going to run event bus. 10 00:00:41,160 --> 00:00:46,550 We're then going to setup some services to allow posts any best to communicate with each other. 11 00:00:46,560 --> 00:00:49,710 Let me show you a diagram to help you understand what we're really going to do here. 12 00:00:51,120 --> 00:00:51,510 All right. 13 00:00:51,660 --> 00:00:57,870 So we have one node we currently have a pod running our post stuff and pretty soon we're going to set 14 00:00:57,870 --> 00:01:04,230 up a second pod to run all the event bus code these two pods are going to have to somehow communicate 15 00:01:04,230 --> 00:01:05,330 with each other. 16 00:01:05,370 --> 00:01:10,770 Now unfortunately these pods cannot just reach out directly back and forth to each other like so they 17 00:01:10,770 --> 00:01:14,500 technically can but there are a variety of reasons so we don't do so. 18 00:01:14,670 --> 00:01:19,320 We never really know ahead of time what I.P. address a pod is going to be assigned. 19 00:01:19,500 --> 00:01:26,460 And so we can't really just reach out to say local hosts whatever they 4000 like so because this pod 20 00:01:26,460 --> 00:01:28,410 will not be accessible at local host. 21 00:01:28,410 --> 00:01:33,850 Instead it gets assigned more or less a random IP address inside of our communities cluster. 22 00:01:34,050 --> 00:01:39,130 And this event bus will not know ahead of time what that IP address is. 23 00:01:39,170 --> 00:01:45,550 That's why we have to communicate between these pods through these cluster IP services the post pod 24 00:01:45,640 --> 00:01:50,170 is going to want to reach out and send a message over to the event bus and we've discussed that many 25 00:01:50,170 --> 00:01:51,130 times before. 26 00:01:51,340 --> 00:01:57,590 But as I just said we can't reach out directly so instead we're going to create a cluster IP service 27 00:01:58,070 --> 00:02:04,350 that's going to govern access to the event plus pod whenever posts wants to emit an event. 28 00:02:04,370 --> 00:02:11,060 It's going to make a request over to that cluster I.P. service in turn the event bus is going to want 29 00:02:11,060 --> 00:02:13,710 to send an event back over to post. 30 00:02:13,820 --> 00:02:18,860 It technically wants to send an event to many other pods or any other programs inside of application 31 00:02:19,100 --> 00:02:23,030 but we're not going to worry about creating anything to run say the comments pod or anything like that 32 00:02:23,030 --> 00:02:23,510 just yet. 33 00:02:23,540 --> 00:02:29,390 We're just going to set up post and event bus so event buzz is going to want to send a message back 34 00:02:29,390 --> 00:02:30,890 over to the post pod. 35 00:02:30,950 --> 00:02:35,710 But as I just mentioned we can't reach out directly or at least not very easily. 36 00:02:35,720 --> 00:02:41,930 So instead we're going to have the event bus pod reach out to the cluster I.P. service that is governing 37 00:02:41,960 --> 00:02:43,400 access to the post pod. 38 00:02:43,400 --> 00:02:50,170 Like so I know these lines are now kind of overlapped but that's look somewhere bad. 39 00:02:50,180 --> 00:02:50,600 There we go. 40 00:02:50,630 --> 00:02:57,700 That's kind of what it is actually looking like in reality so essentially what we have to do is create 41 00:02:57,830 --> 00:03:01,430 another deployment that's going to create this event plus pod. 42 00:03:01,600 --> 00:03:07,440 We're then going to create one cluster I.P. service for posts and one cluster IP service for event buzz. 43 00:03:07,480 --> 00:03:11,710 So with all that in mind let's take a pause right here and start making this stuff in just a moment.