We've now created a deployment.
So now we're going to take a look at a couple of commands we can use to inspect that deployment and
manipulate it in some fashion.
The first command we're going to take a look at is QCT l get deployments that's going to list out all
the running deployments we have on our cluster so I'll do a cube Seitel it deployments and we'll see
that we have one deployment called Post dash double on here is a ready number up to date and available
ready is the number of pods that we are trying to create.
That's the number on the right of the little slash right there and then on the left hand side is the
number of pods that are up and running and ready to receive some traffic or do some work.
We've also got the number of up to date pods because remember we use deployments to manage updating
the versions of some code or application running inside these pods and then the number of pods that
are available and again ready to do some work for us.
Of course we can also now print out the pods we have running inside of our cluster as well we should
see one pod that has been created automatically by this deployment so we can do a cube CDL get pods.
And right there is the pod that was created by our deployment.
And very interestingly if you and I tried to delete this pod that was created by the deployment the
deployment is going to see that that pod has mysteriously disappeared and so it's going to attempt to
recreate the pod for us.
Let's try doing that right now.
I'm going to delete that pod that was created by the deployment with a cube Seitel delete Khaled and
then I'll put in the name of the pod.
I'm going to copy paste that name right there.
Remember the first poster right there just as a reminder.
That is the pod that we created in the last couple of videos and we were working with pods initially
all right.
So I'll delete that pod and have to wait a second or two and after that command is completed we can
then get our pods again and you'll notice.
Wait a minute.
We still got two pods.
Well not quite.
Take a look at the exact name of the pod that we just deleted.
It was posed Stemple then some I.D. and then some other part of an I.D. and then take a look at the
next one down here.
You'll notice at the last part of that is completely different.
In addition the age of this pod right here is only eleven seconds but the instant we deleted the old
pod our deployment automatically created a new one for us.
So I think you can start to see how using deployments to manage some workloads inside of application
are really fantastic.
If anything starts to go wrong well Cuban eddies has our back.
It's going to automatically tried to repair our application now a couple more commands here.
First off it keeps GTL described deployment you can use this to print out some information about a specific
deployment.
Again we're going to usually do this any time that we're trying to debug a deployment and figure out
why it's not working correctly so we can do a cube Seitel describe deployment and then the name of our
deployment was backup.
Here is post dash devil
you can see there is once again a lot of gibberish information here.
Over time a lot of this stuff will start to make sense.
But for right now well there's just a lot of information.
Again the most important part is the events down here.
It's going to tell you about what is going on inside of your deployment.
Next up we can create a deployment out of a config file using that same QCT cell apply dash f command.
And finally if we need to delete a deployment.
Yep cubes EDL delete deployment so we can do a cube CDL delete deployment of post dash double as soon
as we delete that deployment all the associated pods are going to be deleted as well.
So I should be able to do a cube CDL get pods and I'll see that I don't have any pod related to that
deployment running anymore.
So the instant the deployment goes away all the associated pods disappear as well.
I can then recreate the deployment for the cubes GTL apply dash chef both dash double then I'll get
my deployments again.
Yep there it is and my pods and there's the pod created by the deployment now while we're looking at
our list of pods we're going to delete that old pod that we created manually from a couple of videos
ago.
It's going to do a QCT cell delete pod boats again just to get rid of that thing as we usually do not
create pods manually if they crash for any reason that we don't have anything to start them back up
and once that's deleted.
Very good.
We'll go ahead take a pause right here.
One last thing I want to show you around deployments in just a moment.