As we discussed in the last video we need to somehow make the Jason Webb token signing key available
to all of our different services.
We're going to solve this using a feature inside of Cuban ideas that is designed for sharing its secret
information throughout different pieces of our application.
So a couple of quick diagrams.
This is a diagram of our Cuban eddies node.
Inside of it there are many different pods in it and in our case all these different pods are running
a container that needs to somehow get access to that Jason Webb token signing key to do so we are going
to create a new kind of object inside of our cluster.
But this is an object called a secret remember that objects are referring to just about everything we
create inside of Cuban eddies.
So a pod is an object a deployment is an object.
And so on a secret is a is a object just the same inside of a secret.
We can store little key value pairs of information so you and I can create a secret that's going to
store something it says Jason Webb token key equals a SDF or something very similar to that.
Once we create the secret we can load it into the containers that are created inside of all of our different
pods the secret is going to be exposed as an environment variable.
Now this diagram right here is just a little bit deceptive because I'm saying that inside of our pod
we've got some off thing and there's some environment variables to be precise.
We have our ops application right here really the node program of off that is running inside the container
and inside of that container there are a set of environment variables.
So when I'm saying that there is an environment variable inside the pod the environment variable is
really inside the same container as the off application they're going to take that Jason key or assuming
that Jason Webb token key equals a SDF assign it to these environment variable sets and then we can
easily access that information from inside of our node J.S. code.
So that's how we're going to store the Jason Webb token signing key.
In one location securely and then actually get it available to all the different services that need
it now that we understand what we're gonna do.
Another quick pause right here.
We will create the secret in the next video and then make sure that it gets exposed to all of our different
micro surfaces.