In this section we're going to start making some changes to our deployment configuration file and just
verify that all the parts that are associated with this deployment successfully get updated.
So in particular I really want to try updating the container port value down here from 3000 to some
other value because you will recall that when we tried changing that container port inside of our client
pod or client Dasch pod Emel file.
We very quickly got an error message saying hey you can't update that value.
OK.
So back inside of the client deployment.
So we're in the deployment file right now.
I'm going to find the container port and I'll update the port to 9 9 9 9 9 like so that just so you
know when we change this port assignment you will no longer be able to visit our application inside
the browser.
So in case you apply this update and then try to test it out inside the browser it's not going to work
because the container doesn't care about port 99.
It wants to expose traffic on port three thousand.
So now we changed our configuration file are going to make sure that I save the file and then I'm going
to go back over to my terminal and we're going to do the same thing we always do.
Anytime we want to update an object we'll do a cube Seitel apply dash f Wyant deployment.
Email so I'll run that and then it tells us very directly that an existing object type with this name
was configured.
It says configured as opposed to something being created.
So we definitely just made a change to an existing deployment as opposed to creating a new one entirely.
We can now do a CUV TTL get deployments to print out all of our deployments.
Yup it's still there.
I can do it Cubas DTL get pods.
And now with this you're going to see something a little bit more interesting.
Notice how the age of this pod right here is 26 seconds.
So clearly when we apply this configuration file right here Kuber Nettie's notice that we made a change
to the template for the pods that are being controlled by this deployment.
It saw that we changed the container port.
And so rather than trying to update the existing pod that already existed it deleted that pod and completely
recreated it with a new container port value right here.
OK.
Now one thing you would be really nice to do is make sure that this new pod right here is in fact running
with that new port.
So I'll do a CUV Seitel describe pods will get the long form description about this pod right here and
will probably be able to verify that port 9 9 9 is assigned to it.
Now remember when you do describe pods the name of whatever you want to look up is completely optional.
In this case we only have one pod.
So I'll just print out the information about all pods because hey there's only one.
So when I run that I'll scroll up a little bit and then I should be able to see lists of containers
Here's the clank container and it has port nine nine nine maps on it.
So without a doubt this POD is running with the most up to date configuration.
OK.
So that's pretty cool.
Now I want to do one other change or one or two other changes here.
Let's first try scaling up our replicas setting right here.
So when we scale up from one to something like say five we're now going to have our deployment attempt
to create five different pods all with this identical template right here.
So I'm going to make sure I update replicas to five or save the file and then as usual we'll do a cube
Seitel apply Wyant deployment emal.
Now if you type in very quickly cubes DTL get deployments we might ok little bit to slow that case.
In that case you'll notice that everything says five right here.
If we were a little bit faster we might be able to see that there are less than five of these different
pods available.
We'll make another change in a second.
And we'll hopefully be able to if we type in this get to Flemons fast enough of my CD update in action
and we'll see something like hey only a fiver maybe 1 or even 0 pods are currently available.
So if we now do a cube Seitel get pods you'll notice we have five separate pods each of which are running
a unique copy of that very specific client.
It's see multi client.
That's the idea or that's the name of that multi-line image.
So we now have five containers running each in their own very separate little pod.
Let's try making one more configuration change.
So how about instead of running the image multi client let's try on the image multi worker instead.
It's going to change the name of the image that we're running inside this pod.
I going make sure I save the file.
Now this time after we do the cube Seitel apply dash f client deployment.
I'm going to very quickly right after I run this command you know very quickly do a cube Seitel get
deployments and hopefully we'll see some different numbers of containers or different numbers of pods
inside there as the deployment is creating and destroying some of the pods inside of our cluster.
I guess I can hit enter here and then very quickly I'll do a cube Seitel get deployments.
Now that's interesting.
So notice I typed in fast enough that I was able to see some different numbers in action here.
So the client deployment wants to have five different pods with the very specific configuration listed
right here.
But at present there are seven pods.
That means that maybe five of the old version exist are actually you know we can use these other numbers
here to figure it out.
So there are seven pods total and four of them are up to date and available.
That means that we have four up to date and available pods running the newest configuration that says
that we should be running the multi worker image.
That means that there are three other pots because seven months for us three means that there are three
pods still sitting around using the old configuration and those need to be deleted and cleaned up.
If we now do cube Seitel get deployments again we're probably going to see five across the board because
now all the older versions of those pods have been deleted and replaced with the latest up to date version
of the pod spec which says that we need to have the multi worker image running inside there.
OK.
So it's pretty interesting to see these deployments in action.
So let's take another quick pause.
We're going come back the next section and I want to point out one or two kind of interesting things
about this entire deployment system that might trip you up when you start making use of it in a production
environment.
So quick pause and I'll see you in just a minute.