WEBVTT

00:00.840 --> 00:01.673
-: In our last section,

00:01.673 --> 00:05.160
we configured the gcloud CLI on our cloud console.

00:05.160 --> 00:06.690
We can now test out our connection

00:06.690 --> 00:09.900
to our reduction Kubernetes cluster right here,

00:09.900 --> 00:13.920
by doing something like kubectl get pods.

00:13.920 --> 00:15.090
When I run that command,

00:15.090 --> 00:16.620
I should eventually see something come back

00:16.620 --> 00:18.330
that says, no resources found.

00:18.330 --> 00:21.120
Because of course we have not yet created any pods

00:21.120 --> 00:22.980
inside of our Kubernetes cluster.

00:22.980 --> 00:24.930
But this is at least demonstrating that yep,

00:24.930 --> 00:27.450
it is in fact connected to our Kubernetes cluster.

00:27.450 --> 00:29.910
And that means we can use kubectl right here

00:29.910 --> 00:32.130
to issue different commands to say,

00:32.130 --> 00:34.530
create a new secret or do whatever else

00:34.530 --> 00:36.030
that it is that we need to do.

00:37.260 --> 00:40.410
So again, for us, we want to create a secret.

00:40.410 --> 00:44.310
So we're going to do kubectl create secret generic.

00:44.310 --> 00:48.300
Our secret name is PG password, all lowercase.

00:48.300 --> 00:50.951
And I know that because of my server deployment

00:50.951 --> 00:52.653
config file back here.

00:53.730 --> 00:57.330
So the secret name is PG password lowercase.

00:57.330 --> 00:59.400
And then we'll say, from literal,

00:59.400 --> 01:02.250
and then we'll use capital PG password equals

01:02.250 --> 01:04.410
and then whatever password you want to use.

01:04.410 --> 01:06.780
Now, this is the initial setting of this password.

01:06.780 --> 01:08.040
It does not have to be the same

01:08.040 --> 01:09.510
as your development password,

01:09.510 --> 01:11.610
and in fact it should very likely be different.

01:11.610 --> 01:15.180
So we can make this password anything we want it to be.

01:15.180 --> 01:17.380
All right, so I'm going to go back over here

01:18.420 --> 01:23.420
and I'll do kubectl, create secret generic,

01:23.760 --> 01:26.010
and I'm just gonna double check here.

01:26.010 --> 01:28.470
So I have a short memory sometimes,

01:28.470 --> 01:30.120
create secret generic, yep.

01:30.120 --> 01:32.650
And then our secret name is going to be lowercase

01:33.637 --> 01:37.680
pg password dash dash from literal

01:37.680 --> 01:41.610
and then capital pg password equals

01:41.610 --> 01:43.590
and then whatever password you want to use.

01:43.590 --> 01:44.700
So for me, I'll do something like

01:44.700 --> 01:48.483
I don't know, my pg password, 1, 2, 3, whatever.

01:51.120 --> 01:52.410
Okay, so I'm gonna run that command

01:52.410 --> 01:54.900
and I'll see that the secret was created.

01:54.900 --> 01:56.700
So now something that's kind of interesting

01:56.700 --> 02:01.320
if I drag that little interface down and refresh this page

02:01.320 --> 02:03.780
it might ask you to reload, which is totally fine.

02:03.780 --> 02:04.780
I'm going to reload.

02:07.650 --> 02:10.170
And then I'll open up the configuration tab over here

02:10.170 --> 02:12.270
and we'll see that the secret has now been created

02:12.270 --> 02:15.810
and is available for use inside of our application.

02:15.810 --> 02:17.400
Cool, so that looks pretty great.

02:17.400 --> 02:19.500
Now there is just one other thing we need to do

02:19.500 --> 02:20.820
before we get to our deployment.

02:20.820 --> 02:22.290
So let's take a quick pause right here

02:22.290 --> 02:24.290
and take care of it in the next section.
