In theory everything inside of our cluster is now working.
We should have perfect communication between our post pod and the event plus pod as well.
We actually test this stuff out.
We're going to make a POST request to oppose an attempt to create a new post whenever we do that.
Remember that our current implementation should attempt to reach out to the event by service and emit
some kind of event.
We should eventually see some kind of console log or something like that between these two something
it says.
Oh and the event was just emitted or an event was just received or something very similar to that.
So we are going to use that API client called postman which we use much earlier inside the course to
send a post to posts or then use the cubes TTL logs command to just make sure that we see some logging
information related to emitting or receiving some kind of event so let's get to it.
I've already opened up the API client postman so here it is right here.
I can open up a new tab.
We need to make a post request and we're going to make this post request to H TTP and remember we are
trying to access the node port service right now.
That's governing access to the post pod So recall that we spoke about node port services just a little
bit ago.
Let's see where is our diagram for it.
Here is right here.
So remember if we are trying to access some pod that is running inside of our cluster we can use a node
port service and we typically only use those for development purposes which is exactly what we are doing
right now.
Remember that to access that thing we have to use that randomly assigned port that usually starts with
three.
It's in the 30 thousands and the actual you or L that we're going to use depends upon whether you are
using Docker for Mac or Windows or in any cube.
So again if you are making use of many cube you will run many cube IP and that will give you the IP
address that you're going to make your request to.
Otherwise if you're on Docker for Mac or Windows you will use local host to actually get the port that
we need to make the request to we can rerun that cube CDL get Services Command we'll see the Postal
Service right there of type note port and at the very end is the actual port that we use to get to that
node port service from outside of our cluster.
So for me it is 30 for a two for you.
It might be something slightly different so I will put in a local host 30 for 0 2 for you.
You are very likely can have a different port and if you are using mini cube right now you will not
have local host.
Instead you will have whatever IP was assigned to you from any cube.
Then at the very end we're going to make a post request to post.
Of course I'll then go to headers.
I'm going to put in a content type of application Jason.
I'll get a body.
We'll go to RA but in a title of post I can make sure I've got Jason selected over here in the dropdown
and then here's the big test.
I'll hit send and believe it or not status to a one created guy that looks good but that's really just
kind of testing the functionality that we already verified around the node port service.
Let's now start to pull some logs out of our post pod and the event plus pod and make sure that these
things are exchanging events.
So for that I'm going to go back over to my terminal.
I'm going to print out all my different pods
and I'll use the cube Seitel log command to print out some logs from the event plus and the Post's board
though and take a look at post first.
I'll do a cube TTL logs and then paste in that pod name and hey look at that received event post created.
So what does that little line right there really mean.
Well it means that when we created that post our post pod sent a message out to the event bus through
the event bus service it sent out the post created event event bus then took that event and emitted
it to all of the different services that are running inside right cluster right now or I don't really
mean to say that I mean to say specifically right now really just the post cluster IP service.
That means that we were able to send a message to the event bus and receive a message from the event
bus as well and that's pretty much it.
So that's really proof that we can get all this stuff working inside of our Cuban cities cluster.
So now to really wrap up our application and finish up all this kind of Cuban needs introduction stuff
we're going to start to introduce all the other micro services we had put together.
So we are going to create deployments and cluster IP services or comments moderation and query and we're
going to make sure that all these things have the correct you URLs that are going to attempt to access
the event bus or the appropriate micro service and so on.
Let's start that final step of integration in just a moment.