1
00:00:00,820 --> 00:00:03,970
This is the solution we do for the secret lab.

2
00:00:08,050 --> 00:00:13,060
So for the first question, we have to find the number of secrets and the default namespace.

3
00:00:17,840 --> 00:00:24,200
To do this, let's go to the terminal and Ron Capsid still get secrets and you'll find that there is

4
00:00:24,200 --> 00:00:29,750
one secret by the name of default, Tolkan, which is on the default namespace.

5
00:00:30,110 --> 00:00:32,600
So the answer is one.

6
00:00:36,930 --> 00:00:42,750
For the second question, we have to find the number of secrets defining the default Tolkan secret.

7
00:00:44,830 --> 00:00:50,770
And for this, we'll run the command you describe secret in the name of the secret, which is Default

8
00:00:50,770 --> 00:00:51,250
Tolkan.

9
00:00:52,970 --> 00:01:00,470
And you'll see under the data section that it has got three secrets want to see it, CRT namespace and

10
00:01:00,470 --> 00:01:00,980
token.

11
00:01:06,000 --> 00:01:07,500
So the answer is three.

12
00:01:10,870 --> 00:01:14,830
What is the type of secret for default, Ashokan?

13
00:01:17,130 --> 00:01:20,070
Will he make use of the same command, Kubasik, to describe?

14
00:01:22,400 --> 00:01:26,950
And you can look for the type, which is Service Account, Dash Tolkan.

15
00:01:34,350 --> 00:01:38,850
Which of the following is not a secret data defined in the default Tolkan?

16
00:01:42,110 --> 00:01:44,540
So let's go back to the describe commander.

17
00:01:47,280 --> 00:01:52,810
So if you're on the describe command, you'll see that it has got zero city namespace and tokenized

18
00:01:52,810 --> 00:01:54,810
as the three secrets defined.

19
00:01:56,480 --> 00:01:58,820
So the odd one out is type.

20
00:02:00,220 --> 00:02:01,030
Let's select that.

21
00:02:03,380 --> 00:02:09,200
And for the next question, we are going to deploy an application with the blue architecture, we have

22
00:02:09,200 --> 00:02:14,270
already deployed the required pods and services to call deposits services, and we can also check out

23
00:02:14,270 --> 00:02:18,060
the application by clicking on the Web MySQL link.

24
00:02:19,070 --> 00:02:20,330
And let's check out the architecture.

25
00:02:20,340 --> 00:02:22,820
There's a MySQL part and a MySQL service.

26
00:02:23,150 --> 00:02:25,670
There's a Web app part and Web App Service.

27
00:02:29,090 --> 00:02:32,510
That's on the command cubes, it will get parts of service.

28
00:02:33,800 --> 00:02:35,900
And you'll find that there are two parts.

29
00:02:37,260 --> 00:02:39,540
And there are two new services created.

30
00:02:43,470 --> 00:02:50,760
Let's now click on the Web application and you'll get a red screen here, Sanfield.

31
00:02:51,850 --> 00:02:57,460
And it seems that failed to connect to the mighty clearways environment where rebels have not been set,

32
00:02:57,460 --> 00:03:00,190
Debe has not said and none of the other values are said.

33
00:03:00,970 --> 00:03:04,620
So it does not able to connect to the MySQL database.

34
00:03:08,960 --> 00:03:09,770
Click on Talk.

35
00:03:11,740 --> 00:03:17,050
The reason the application has failed is because we have not created this secret yet, create a new

36
00:03:17,050 --> 00:03:20,440
secret named with the secret, with the data given on the right.

37
00:03:20,800 --> 00:03:26,980
So name of the secrecy debate are secret so we can create a secret using the imperative way.

38
00:03:27,010 --> 00:03:29,590
So around could will create secret.

39
00:03:32,060 --> 00:03:32,840
Generic.

40
00:03:34,820 --> 00:03:40,490
And the name of the secret is Devora Secret and will use the dark dash from Litoral flag here and copy

41
00:03:40,490 --> 00:03:42,320
the secrets that have to be added.

42
00:03:42,330 --> 00:03:46,640
So the first one is DBI undisclosed, which is equal to sequel's or one.

43
00:03:48,150 --> 00:03:56,730
And similarly will use the same flak from Litoral as equal to and copy over the remaining two secret.

44
00:04:10,690 --> 00:04:12,490
Now the secret has been created.

45
00:04:14,780 --> 00:04:17,450
Let's from to describe the new secret.

46
00:04:19,070 --> 00:04:21,520
Can see under the data, we recorded three secrets.

47
00:04:31,600 --> 00:04:37,690
So next, we have to configure the Web dashboard to load the environment variables from the newly created

48
00:04:37,690 --> 00:04:40,690
secret so lab to delete and recreate the part.

49
00:04:41,840 --> 00:04:43,790
The port name is Webapp Dashboard.

50
00:04:43,820 --> 00:04:47,120
The image is the same as before, which is called cloud slash.

51
00:04:47,300 --> 00:04:54,020
Simple way about my skill and we'll have to use the environment variable, which called the secret so

52
00:04:54,020 --> 00:04:59,510
will make use of the envy from field and the secret Niemans debate a secret which we created in the

53
00:04:59,600 --> 00:05:00,470
previous step.

54
00:05:05,450 --> 00:05:17,600
So first, let's get the YAML file for the webapp Doszpot will do that using Cupitt We'll get part webapp

55
00:05:17,600 --> 00:05:21,440
Doszpot National YAML and redirected to port.

56
00:05:25,690 --> 00:05:27,730
Now we can delete the pod.

57
00:05:28,720 --> 00:05:32,530
We'll be recreating the part in a minute, using the secret.

58
00:05:38,610 --> 00:05:40,830
Let's open the pod definition file.

59
00:05:41,550 --> 00:05:44,520
I'm just going to remove the fields, which are not necessary.

60
00:05:58,710 --> 00:06:06,330
And one of the commands that I like to use, this cube will explain parts to see the syntax of making

61
00:06:06,330 --> 00:06:08,940
use of envy from along with the secret.

62
00:06:09,360 --> 00:06:19,290
So I'll use Cuba still explain dash dash recursive and by two or less command and search for the N.V.

63
00:06:19,290 --> 00:06:19,740
from.

64
00:06:22,080 --> 00:06:27,770
So Ian Lee from has got all these values which are possible one as the conflict map, but there's also

65
00:06:27,770 --> 00:06:30,070
a secret reference that can be defined at Banita.

66
00:06:30,090 --> 00:06:34,880
So this is just in case you don't not remember the syntax, you do not have to remember it by heart.

67
00:06:35,400 --> 00:06:37,320
You can always refer to it as the Cuban.

68
00:06:37,320 --> 00:06:40,860
It is documentation or these explained commands are quite handy.

69
00:06:41,970 --> 00:06:47,610
So what I'm going to do is I know that there are about eight to 10 lines underneath which I can copy

70
00:06:47,610 --> 00:06:54,960
and paste it in my YAML, so I'll exit out of those less common and grab for N.V. from.

71
00:07:00,670 --> 00:07:08,590
So let's do that now, so grap I have an eight for eight lines and from now printed on the screen and

72
00:07:08,590 --> 00:07:10,240
I'm just going to copy it.

73
00:07:11,450 --> 00:07:18,290
And pasted in the poor definition file al-amoudi fields, which are not required or relevant later.

74
00:07:22,200 --> 00:07:23,940
So underneath the name.

75
00:07:24,970 --> 00:07:26,530
I'm just going to piss the whole thing.

76
00:07:28,080 --> 00:07:29,280
Right, click and paste.

77
00:07:30,690 --> 00:07:36,900
And the first things that I'm going to do is remove the conflict map reference related fields which

78
00:07:36,900 --> 00:07:41,280
are not required for this, is going to keep the N.V. from.

79
00:07:42,270 --> 00:07:49,110
Which is an area so will define the value underneath it, which a secret reference as an array, and

80
00:07:49,620 --> 00:07:53,910
I'll keep the remaining two options, which is the name and optional is not required.

81
00:07:53,940 --> 00:07:55,100
So we'll delete that as well.

82
00:07:57,460 --> 00:07:58,630
Let me remove this.

83
00:07:59,630 --> 00:08:09,170
And then I'll define secret reference as an array and what comes underneath is an object, so I'm going

84
00:08:09,170 --> 00:08:09,950
to remove that.

85
00:08:13,510 --> 00:08:16,830
And make sure it's formatted correctly.

86
00:08:19,430 --> 00:08:20,600
And often is not needed.

87
00:08:20,630 --> 00:08:24,660
So this is a strength that they can have a strength, which is the name of the secret in this case.

88
00:08:24,680 --> 00:08:26,360
So I'm just going to define that here.

89
00:08:32,310 --> 00:08:35,580
So let's call it from the question and paste it here.

90
00:08:36,770 --> 00:08:42,290
So this is just a nice little trick that you can use and with practice, this will be really useful

91
00:08:42,290 --> 00:08:43,780
for all different commands.

92
00:08:43,790 --> 00:08:47,100
For example, secrets if you want to create a volume out.

93
00:08:47,420 --> 00:08:49,020
Everything is defined with a leak.

94
00:08:49,730 --> 00:08:51,980
Still explain recursive.

95
00:08:51,980 --> 00:08:52,400
Come on.

96
00:08:52,700 --> 00:08:57,890
Or you can also make use of the documentation or both together if you want just to make sure that everything

97
00:08:57,890 --> 00:09:00,410
has been created as it should be.

98
00:09:04,240 --> 00:09:05,920
Now, let's read the part.

99
00:09:11,210 --> 00:09:12,890
So pot has been created.

100
00:09:15,060 --> 00:09:16,770
Let's go back and check.

101
00:09:20,800 --> 00:09:28,410
And now we can check the Web application, just refresh it, and we are getting a successful result.

102
00:09:30,290 --> 00:09:31,700
So that was the last question.

103
00:09:31,850 --> 00:09:33,910
Thank you for joining me on the Slap.

104
00:09:34,120 --> 00:09:35,450
I'll see in the next one.
