As I mentioned at the in the last video we're going to focus on deploying that streaming server into
our communities cluster in this video.
So let's get to it.
Like anything we've been deploying we're going to go into our code Ed find the infra directory inside
the K AIDS folder.
We'll make a new file called Nat's dash devil thought memo we're gonna write out a deployment site of
here again very similar to the ones we've already created at the very top.
We'll write out API version apps slash the one I'm going to set this to a kind of deployment for metadata
we'll give a name of Nat's dash devil then for the spec and say that I want to run one copy of this
thing we'll put on our selector with match labels app that's then our pod template section
we'll once again put in a metadata section meta data.
There we go.
Couple of typos you're gonna fix up in here.
We'll set up some labels in particular just app that's then on the same level of indentation as metadata.
We'll put in our pod spec we're going to be running at one container.
I'm going to give it a name of Nat's and then our image that's dash streaming and we're gonna specify
a specific version here of zero point one seven point zero.
All right now we've got our container specified right here and we said Here's the image we want to run.
Just a moment ago I had said over here on the docker have documentation that some of these command line
options were really important for us to set.
If we ever want to set some custom command line options to be executed with our container starts up
we can provide them in an option right here in this container section.
So we're gonna write out arcs.
This is going to be an array of arguments to provide to the primary command that gets executed when
a container is built out of our image.
So in other words we can take a look at all these different command line options right here.
Let's just pick one at random and say How about Dash s.t. if we wanted to set this dash as t flag and
make sure that Nat streaming server executed itself with the s t flag we would add inside this args
array instead of a string dash as T each separate argument that we put inside of here is going to be
separated inside of this array and two separate strings.
So for example the documentation here says that we when we use the s t flag we provided a string.
So if I wanted to provide s t and give it a string argument I would put in Nash s t and then something
right here like that.
Now we're not going to actually set S T.
But there are a variety of different arguments that we are going to be setting our list here of different
arguments is going to end up being pretty darn long.
So bear with me for a second because we're gonna write out a lot of different arguments right here.
Please make sure that you put in the exact same order that I do.
Make sure that you don't have any typos of course or anything like that.
All right.
So let's get to it.
A lot of different arguments we're going to put in.
Dash P or two to two we'll put in dash M 8 2 2 2.
I'm going to put in dash HB I five s dash HB t five s
dash HB F Up to then s dash SD.
There we go.
And then finally Dash.
See I.D. ticketing.
Like so now we are going to come back over here and discuss exactly what all these different arguments
are about.
Or alternatively of course you can reference all those different arguments against these command line
options but of course you don't want to do the reference yourself.
Don't sweat it.
We'll go over these options later on get.
So that is it for the actual deployment itself.
Naturally we still want to be able to get a connection to this deployment of the pod created by it.
So we are going to also create a service a cluster IP service that's going to get us access to the net
streaming server that gets created to down at the bottom.
The file I gonna put in the dash dash dash and I'll write out a separate config to create a cluster
IP service.
I'm gonna put in an API version of V1 a kind of service for metadata a name of Nats SRB
or a spec a selector of app Nats and then ports.
In this case we're going to expose two separate ports.
We're going to put in name calling client and protocol DCP and for that we'll have a port for 2 2 2
and a target port of 4 2 2 2 then we'll add in a second port to expose I'm gonna give this one a name
of monitoring protocol of DCP a port of 8 2 2 2 and a target port of 8 2 2 2.
All right so a lot of typing.
I apologize for all the typing but this is the worst of it from here on out.
All the code that we're gonna write around outstripping server is going to be actually kind of interesting
thing we're gonna do is save this.
We're gonna go back backwards to scaffold we're going to make sure that our deployment was created.
Yep I see somewhere inside of here the thing actually was created once I see that.
I'll then go over to a new terminal window.
We're going to try to print out all the different pods that are running inside of our cluster.
And remember we do that with the cube GTL get pods and I should then see a Nats deployment pod right
there.
Very good.
Make sure that you've got a status of running.
It might take some time of course to pull down the actual image so if it says that thing is still creating
or something like that you can rerun QCT I'll get pods and make sure that just eventually flips over
to running.
All right.
So now that are not streaming servers up and running now though a quick pause right here.
Next video we're going to focus on what Nat streaming server is and how we're going to work with it.
He had no J.S. CEO in just a minute.