-: In our last section,
we configured the gcloud CLI on our cloud console.
We can now test out our connection
to our reduction Kubernetes cluster right here,
by doing something like kubectl get pods.
When I run that command,
I should eventually see something come back
that says, no resources found.
Because of course we have not yet created any pods
inside of our Kubernetes cluster.
But this is at least demonstrating that yep,
it is in fact connected to our Kubernetes cluster.
And that means we can use kubectl right here
to issue different commands to say,
create a new secret or do whatever else
that it is that we need to do.
So again, for us, we want to create a secret.
So we're going to do kubectl create secret generic.
Our secret name is PG password, all lowercase.
And I know that because of my server deployment
config file back here.
So the secret name is PG password lowercase.
And then we'll say, from literal,
and then we'll use capital PG password equals
and then whatever password you want to use.
Now, this is the initial setting of this password.
It does not have to be the same
as your development password,
and in fact it should very likely be different.
So we can make this password anything we want it to be.
All right, so I'm going to go back over here
and I'll do kubectl, create secret generic,
and I'm just gonna double check here.
So I have a short memory sometimes,
create secret generic, yep.
And then our secret name is going to be lowercase
pg password dash dash from literal
and then capital pg password equals
and then whatever password you want to use.
So for me, I'll do something like
I don't know, my pg password, 1, 2, 3, whatever.
Okay, so I'm gonna run that command
and I'll see that the secret was created.
So now something that's kind of interesting
if I drag that little interface down and refresh this page
it might ask you to reload, which is totally fine.
I'm going to reload.
And then I'll open up the configuration tab over here
and we'll see that the secret has now been created
and is available for use inside of our application.
Cool, so that looks pretty great.
Now there is just one other thing we need to do
before we get to our deployment.
So let's take a quick pause right here
and take care of it in the next section.