In the last section we started talking about deployment objects remember a deployment is going to run
and manage a set of identical pots from this point forward throughout this course.
We are no longer going to create pods ourselves manually.
Instead we're going to create deployments that will create pods for us.
So deployments are appropriate for use in both a development and production environment.
We're going to make a deployment that has a pod template that's going to try to create a container using
the image multi client and we're going to make sure that port 3000 is exposed.
Now the reason we're going to make it deployment with multi client and port three thousand open is so
that we can test this out in the browser.
Once a deployment creates our actual pod.
So to make it deployment we're going to use the same process that we use for every other object that
we're ever going to create with Kuber Nettie's.
We're going to make a configuration file and then feed that configuration file into Kube CTO.
So inside of my code editor I'm going to create a new configuration file inside of my project directory
and I'll give this file a name of client Dasch deployment.
YAML
and then inside this file We're going to add all of our configuration to describe this new deployment
that we're making.
We're going to write out all the configuration together right now and we'll talk about the purpose of
every line immediately after that.
So I'll get started by writing out API version and I'll say apps slash V-1 I'll specify kind of deployment.
So these two lines right here I bet you can guess what's going on.
We are saying that we want to use a object that is defined inside the API version of app slash V-1 and
the specific type of object that we want to create is a deployment.
Next up we'll put down our metadata section and we'll give the thing a name of client Dasch deployment
then we'll do our spec after that or the spec will say replicas is one allowed on a selector with matched
labels and a component Web property like so Eildon on intent.
So I now only have one indent right here.
I'll say template I'll put in meta data labels.
Component web.
I'm going to indent again so that I'm on the same indentation layer as metadata.
I'll say spech containers and will define the list of containers that we want created with every pod
that is controlled by this deployment.
So this is a array entry I'll put in my little dash like so and I'll say that I want a pod that has
a name or a container in this pod with the name of client.
I want it to run the image of my doc or ID slash multi client and then finally we'll set up that port
mapping.
So I'll say ports with a container port of 3000 like the OK.
So something's inside this file might look a little bit familiar.
Let's take a quick pause.
We're going to come back the next section and start breaking this thing down line by line.
So I'll see you in just a minute.