WEBVTT

00:00.020 --> 00:06.290
By deploying our pod replicas using a deployment object, we can reap many, many benefits, one of

00:06.290 --> 00:08.210
them being automated deployment.

00:08.240 --> 00:16.010
So by simply declaring a desired number of pod replicas, Kubernetes will always make sure that we're

00:16.010 --> 00:17.540
at that desired state.

00:17.570 --> 00:24.350
Okay, so if one of the pods ends up failing or terminating for whatever reason, Kubernetes will simply

00:24.350 --> 00:31.970
create a new pod to make sure that we always have the desired number of healthy and running pod replicas.

00:32.000 --> 00:35.210
Okay, so, um, that's automated deployment.

00:35.210 --> 00:41.690
You simply specify your desired state in a YAML configuration file, and Kubernetes will continuously

00:41.690 --> 00:46.340
monitor your actual state and always try to bring you to that desired state.

00:46.370 --> 00:53.210
So in our case, um, it's always going to make sure that two great submission API pods are running

00:53.210 --> 00:57.380
at all times, both of them ready to serve requests.

00:57.500 --> 00:58.460
All right.

00:58.460 --> 01:02.450
So let's go ahead and take a look at it now.

01:02.480 --> 01:07.760
What I'm going to do is start by first demonstrating the benefit of automated deployment.

01:07.760 --> 01:14.810
So remember that we've declared a desired state of two great submission API pod replicas.

01:14.840 --> 01:20.450
Now, if one of these pods were to fail or terminate, for whatever reason, Kubernetes is going to

01:20.480 --> 01:26.570
continuously monitor our current state and try to bring us back to that desired state of two pod replicas

01:26.570 --> 01:28.010
automating their deployment.

01:28.010 --> 01:35.270
So I'm going to simulate pod termination by simply deleting it, deleting it kubectl delete pod the

01:35.270 --> 01:39.110
following that's inside of the grade submission namespace.

01:42.860 --> 01:43.520
All right.

01:43.520 --> 01:46.430
Kubernetes is going to notice that we're missing a pod.

01:46.430 --> 01:51.980
And it's going to automatically create a new one to ensure that we're always at that desired state.

01:51.980 --> 01:53.900
That's what these controllers do.

01:53.930 --> 01:58.970
They always monitor our current state and bring us to a desired state.

02:00.080 --> 02:02.480
Um, this is taking a while.

02:02.510 --> 02:02.900
All right.

02:02.900 --> 02:03.440
We're good.

02:03.440 --> 02:07.970
Now, if I say kubectl get pods dash n great submission.

02:09.920 --> 02:12.080
It automatically created a new one.

02:12.110 --> 02:14.900
Okay, so that's the benefit of automated deployment.
