This is the solution we do for the secret lab.
So for the first question, we have to find the number of secrets and the default namespace.
To do this, let's go to the terminal and Ron Capsid still get secrets and you'll find that there is
one secret by the name of default, Tolkan, which is on the default namespace.
So the answer is one.
For the second question, we have to find the number of secrets defining the default Tolkan secret.
And for this, we'll run the command you describe secret in the name of the secret, which is Default
Tolkan.
And you'll see under the data section that it has got three secrets want to see it, CRT namespace and
token.
So the answer is three.
What is the type of secret for default, Ashokan?
Will he make use of the same command, Kubasik, to describe?
And you can look for the type, which is Service Account, Dash Tolkan.
Which of the following is not a secret data defined in the default Tolkan?
So let's go back to the describe commander.
So if you're on the describe command, you'll see that it has got zero city namespace and tokenized
as the three secrets defined.
So the odd one out is type.
Let's select that.
And for the next question, we are going to deploy an application with the blue architecture, we have
already deployed the required pods and services to call deposits services, and we can also check out
the application by clicking on the Web MySQL link.
And let's check out the architecture.
There's a MySQL part and a MySQL service.
There's a Web app part and Web App Service.
That's on the command cubes, it will get parts of service.
And you'll find that there are two parts.
And there are two new services created.
Let's now click on the Web application and you'll get a red screen here, Sanfield.
And it seems that failed to connect to the mighty clearways environment where rebels have not been set,
Debe has not said and none of the other values are said.
So it does not able to connect to the MySQL database.
Click on Talk.
The reason the application has failed is because we have not created this secret yet, create a new
secret named with the secret, with the data given on the right.
So name of the secrecy debate are secret so we can create a secret using the imperative way.
So around could will create secret.
Generic.
And the name of the secret is Devora Secret and will use the dark dash from Litoral flag here and copy
the secrets that have to be added.
So the first one is DBI undisclosed, which is equal to sequel's or one.
And similarly will use the same flak from Litoral as equal to and copy over the remaining two secret.
Now the secret has been created.
Let's from to describe the new secret.
Can see under the data, we recorded three secrets.
So next, we have to configure the Web dashboard to load the environment variables from the newly created
secret so lab to delete and recreate the part.
The port name is Webapp Dashboard.
The image is the same as before, which is called cloud slash.
Simple way about my skill and we'll have to use the environment variable, which called the secret so
will make use of the envy from field and the secret Niemans debate a secret which we created in the
previous step.
So first, let's get the YAML file for the webapp Doszpot will do that using Cupitt We'll get part webapp
Doszpot National YAML and redirected to port.
Now we can delete the pod.
We'll be recreating the part in a minute, using the secret.
Let's open the pod definition file.
I'm just going to remove the fields, which are not necessary.
And one of the commands that I like to use, this cube will explain parts to see the syntax of making
use of envy from along with the secret.
So I'll use Cuba still explain dash dash recursive and by two or less command and search for the N.V.
from.
So Ian Lee from has got all these values which are possible one as the conflict map, but there's also
a secret reference that can be defined at Banita.
So this is just in case you don't not remember the syntax, you do not have to remember it by heart.
You can always refer to it as the Cuban.
It is documentation or these explained commands are quite handy.
So what I'm going to do is I know that there are about eight to 10 lines underneath which I can copy
and paste it in my YAML, so I'll exit out of those less common and grab for N.V. from.
So let's do that now, so grap I have an eight for eight lines and from now printed on the screen and
I'm just going to copy it.
And pasted in the poor definition file al-amoudi fields, which are not required or relevant later.
So underneath the name.
I'm just going to piss the whole thing.
Right, click and paste.
And the first things that I'm going to do is remove the conflict map reference related fields which
are not required for this, is going to keep the N.V. from.
Which is an area so will define the value underneath it, which a secret reference as an array, and
I'll keep the remaining two options, which is the name and optional is not required.
So we'll delete that as well.
Let me remove this.
And then I'll define secret reference as an array and what comes underneath is an object, so I'm going
to remove that.
And make sure it's formatted correctly.
And often is not needed.
So this is a strength that they can have a strength, which is the name of the secret in this case.
So I'm just going to define that here.
So let's call it from the question and paste it here.
So this is just a nice little trick that you can use and with practice, this will be really useful
for all different commands.
For example, secrets if you want to create a volume out.
Everything is defined with a leak.
Still explain recursive.
Come on.
Or you can also make use of the documentation or both together if you want just to make sure that everything
has been created as it should be.
Now, let's read the part.
So pot has been created.
Let's go back and check.
And now we can check the Web application, just refresh it, and we are getting a successful result.
So that was the last question.
Thank you for joining me on the Slap.
I'll see in the next one.