1
00:00:00,960 --> 00:00:07,110
This is the solution video for the persistent volume and possession volume, claims Lappe.

2
00:00:10,500 --> 00:00:16,230
First question is we have deployed a pod, inspect the pod and wait for it to start running, so it's

3
00:00:16,230 --> 00:00:18,060
deployed in the default namespace.

4
00:00:24,970 --> 00:00:31,930
And here we can see that apart by the name of webapp has been deployed and the default in and it is

5
00:00:31,930 --> 00:00:33,160
now in no running state.

6
00:00:38,580 --> 00:00:44,490
The applications, tools, logs at the location slash log app, dot log viewed the logs.

7
00:00:46,200 --> 00:00:50,010
OK, so to view the logs will run the exact command.

8
00:00:51,110 --> 00:01:00,140
And then check out that for a while within the port, so steel exec webapp space will be a double dash.

9
00:01:03,040 --> 00:01:06,730
And here I'm running cat and finally.

10
00:01:09,060 --> 00:01:13,430
So here we can see the logs for that specific part, it seems to be working fine.

11
00:01:18,640 --> 00:01:22,660
If the pod was to get deleted now, would you be able to view these logs?

12
00:01:23,740 --> 00:01:30,070
So for this, we'll have to check whether there is a volume which is attached to the spot and if it

13
00:01:30,070 --> 00:01:36,520
is attached to that specific folder, so let's run cubicle, describe pod.

14
00:01:38,950 --> 00:01:41,350
And inspect if it has any value elements.

15
00:01:43,920 --> 00:01:50,480
So the only volume that you see here is for the default token, for the service account, the secret,

16
00:01:51,210 --> 00:01:57,780
and other than that, we do not see any other amount and see the mount section that is just for the

17
00:01:57,780 --> 00:01:58,470
service account.

18
00:01:58,480 --> 00:02:02,650
We do not see anything for the log directory.

19
00:02:03,540 --> 00:02:09,030
So in this case, it does not using a volume that means that if the part is deleted, will not be able

20
00:02:09,030 --> 00:02:10,800
to access that file again.

21
00:02:15,760 --> 00:02:23,740
Configure a volume to store these logs, aguaje log webapp on the horse to use the spec given on the

22
00:02:23,740 --> 00:02:24,160
right.

23
00:02:25,310 --> 00:02:32,000
So you have to use a hotspot type volume and here is the hotspot.

24
00:02:32,030 --> 00:02:33,830
And then we have the volume mount.

25
00:02:34,760 --> 00:02:41,480
So essentially we are just going to update the same pod with the volume and the volume mount.

26
00:02:41,510 --> 00:02:48,920
So let's again make use of documentation because there's no way to add a volume and a volume amount

27
00:02:49,040 --> 00:02:49,830
to a pod.

28
00:02:49,850 --> 00:02:53,570
So let's make use of the documentation and look at the examples there.

29
00:02:55,870 --> 00:03:05,110
So just type in volumes and the search bar here and open the first result called volumes and let us

30
00:03:05,110 --> 00:03:07,660
look up some of the examples here.

31
00:03:11,890 --> 00:03:13,280
Yes, and this should be good enough.

32
00:03:13,300 --> 00:03:19,420
There is one for Ebb's, I'm not sure if there is one for hotspots, so let's search for hotspot.

33
00:03:20,260 --> 00:03:22,570
But if it is not there, that's all right.

34
00:03:22,570 --> 00:03:25,240
We can just make use of the very first example.

35
00:03:26,880 --> 00:03:31,510
So there is an example here for hotspots, so we can make use of this as well.

36
00:03:32,280 --> 00:03:36,450
So first things first, let us get the poor definition file.

37
00:03:37,490 --> 00:03:38,900
For the Web part.

38
00:03:41,050 --> 00:03:43,060
For will use Oyamel.

39
00:03:44,130 --> 00:03:48,650
And redirect it to a file, so let's call the file Port Dot Yama.

40
00:03:51,000 --> 00:03:57,180
And now we are going to update this part, so let's scroll down all the way to the bottom, it has got

41
00:03:57,180 --> 00:03:59,930
a lot of extra feel that we really do not need.

42
00:04:00,690 --> 00:04:02,460
So I'm going to delete all of them.

43
00:04:03,650 --> 00:04:05,340
So here's a sample of the volume.

44
00:04:05,540 --> 00:04:09,530
You can also read for this part, let's use make use of the documentation.

45
00:04:11,400 --> 00:04:12,870
The name is even similar.

46
00:04:12,900 --> 00:04:19,230
I'm going to delete everything under this, so I used hundreds to clear out all the lines.

47
00:04:19,230 --> 00:04:21,000
So it's going to delete the lines.

48
00:04:21,210 --> 00:04:23,400
So that should be good.

49
00:04:23,760 --> 00:04:25,740
Gives us a clean slate to proceed.

50
00:04:27,880 --> 00:04:30,640
So the next thing that we're going to add as the volume mounts.

51
00:04:32,080 --> 00:04:35,100
Just going to copy it from the documentation here.

52
00:04:38,120 --> 00:04:41,300
And we'll change it in accordance to.

53
00:04:42,340 --> 00:04:48,570
The question let's see if there is a name or volume which is specified, looks like there isn't.

54
00:04:48,580 --> 00:04:51,960
So let's call it log volume or something of that sort.

55
00:04:54,930 --> 00:04:58,050
And the amount but let us keep it from the question.

56
00:05:00,250 --> 00:05:01,840
That should be log.

57
00:05:04,660 --> 00:05:10,480
Next, let's define the volume sections that should come directly on the containers, on the spec,

58
00:05:11,410 --> 00:05:14,770
and yea, let's add the hotspot type volume.

59
00:05:15,770 --> 00:05:17,620
Let's make use of the example here.

60
00:05:20,630 --> 00:05:26,720
So the name, again, will make change to that and let's copy this template here.

61
00:05:30,880 --> 00:05:35,410
So as you can see, it is a list under the volumes, beginning with the name here.

62
00:05:36,430 --> 00:05:42,340
And this case, so let's change that to the name that we used, which is log.

63
00:05:43,740 --> 00:05:46,590
The volume in our volume mounts definition.

64
00:05:49,040 --> 00:05:56,390
And the hotspot let us change it in accordance to the question so we can copy that from the question,

65
00:05:56,570 --> 00:05:59,240
it should be water log webapp.

66
00:06:04,510 --> 00:06:05,830
Let's delete this.

67
00:06:07,530 --> 00:06:10,140
And will peace disvalue.

68
00:06:11,480 --> 00:06:14,720
This is just a comment that's all right if it's copied.

69
00:06:15,690 --> 00:06:22,830
But make sure that it is correctly indented, so under the most part, yeah, it should be indented

70
00:06:22,830 --> 00:06:23,370
correctly.

71
00:06:23,850 --> 00:06:26,990
I'm just going to remove this just to make sure that it's clear.

72
00:06:28,850 --> 00:06:29,910
That looks all right.

73
00:06:29,940 --> 00:06:31,070
Everything else should be OK.

74
00:06:31,120 --> 00:06:35,510
So first things first, let us delete the existing pod called Webapp.

75
00:06:36,670 --> 00:06:42,610
And let's wait for this to terminate completely, and then once that is done, we can proceed to create

76
00:06:42,610 --> 00:06:46,180
our new pod with the volumes and the volume out.

77
00:06:47,570 --> 00:06:53,730
This can take a few seconds or a minute, so let's wait for it to terminate completely.

78
00:06:55,670 --> 00:07:02,090
All right, so that was deleted, so let's try to create the pod using the pod template that we just

79
00:07:02,090 --> 00:07:02,600
created.

80
00:07:03,640 --> 00:07:09,040
So it looks like there was a mistake, so let's go ahead and corrected it, and it's online 84.

81
00:07:11,110 --> 00:07:13,940
So I'm just going to hit Cole 84.

82
00:07:14,210 --> 00:07:15,310
Oh, take me to.

83
00:07:17,120 --> 00:07:18,560
The volume down section.

84
00:07:22,240 --> 00:07:24,790
It's supposed to have a MANPAD and the name.

85
00:07:28,050 --> 00:07:32,340
All right, so here you'll see that the indentation is incorrect for Walliams.

86
00:07:34,740 --> 00:07:40,110
It should come under this section on the same vertical line as containers, that's the result.

87
00:07:40,140 --> 00:07:41,550
That's the reason why this failed.

88
00:07:42,240 --> 00:07:43,680
Now, it should be correct.

89
00:07:45,120 --> 00:07:47,570
Rest of it look, OK, so let's try that again.

90
00:07:51,700 --> 00:07:54,070
And this time it has created the pod.

91
00:07:55,120 --> 00:08:01,330
Let's run still description and check if it's listing the volume and the whole amount.

92
00:08:03,140 --> 00:08:08,240
And here now, you can see that on the volumes, we have the log dash volume, which is the name of

93
00:08:08,240 --> 00:08:11,710
the volume that we just created, and it is using most spot.

94
00:08:11,720 --> 00:08:13,070
And this is the part.

95
00:08:13,820 --> 00:08:15,710
And on the volume also, you can see the.

96
00:08:16,690 --> 00:08:22,120
That the same volume is mounted on the slash log, so that looks correctly validated.

97
00:08:24,340 --> 00:08:29,100
All right, so moving on next, we had to create a persistent volume with the given specification.

98
00:08:30,070 --> 00:08:32,890
So for this, let's again make use of the documentation.

99
00:08:36,600 --> 00:08:42,180
All right, so we are going to create a hotspot type for system volume and again, for those let's make

100
00:08:42,180 --> 00:08:43,420
use of an example here.

101
00:08:44,250 --> 00:08:48,480
So in the documentation as of this recording, there is no example for us.

102
00:08:48,480 --> 00:08:51,390
But let's try to see if we can find it.

103
00:08:53,090 --> 00:08:54,560
So there is no direct.

104
00:08:55,990 --> 00:08:58,990
Example for a hotspot for persistent volume.

105
00:09:00,110 --> 00:09:06,500
So in this case, let us rely on a template which is for a different type of storage.

106
00:09:07,860 --> 00:09:16,410
I'm going to search for kind the call to persistent volume, and here we have an example for Neff's,

107
00:09:16,830 --> 00:09:17,840
but that's all right.

108
00:09:17,850 --> 00:09:19,550
Most of the options are the same.

109
00:09:19,560 --> 00:09:20,910
So I'm just going to copy.

110
00:09:22,920 --> 00:09:27,900
Some of the lines from here and let's create a new file called Peridot Yamal.

111
00:09:33,250 --> 00:09:39,460
And let's change the values, so there should be petri dish analytics or production log.

112
00:09:41,900 --> 00:09:44,540
Sighs Let us make sure it does.

113
00:09:44,840 --> 00:09:46,040
As for the question.

114
00:09:48,440 --> 00:09:56,270
We don't need the volume mode, so I'm just going to run, need to delete it and let's the access more

115
00:09:56,270 --> 00:09:57,560
to read write many.

116
00:09:58,800 --> 00:10:06,360
And next, we'll have to add the host, but so in this example from the documentation, there is no

117
00:10:06,360 --> 00:10:09,600
example for those, but it is for any first part.

118
00:10:09,990 --> 00:10:12,180
I'll show you another way to look that up.

119
00:10:14,510 --> 00:10:17,540
Essentially, we can just type in whose part and the part.

120
00:10:19,390 --> 00:10:21,820
As for what's described in the question.

121
00:10:27,530 --> 00:10:34,590
All right, so that looks OK, but, yeah, before we create this, let's run cubicle, explain what

122
00:10:34,600 --> 00:10:35,900
sustained volume.

123
00:10:37,790 --> 00:10:44,030
That's the recursive and I'm going to use less and to see the options for whose part we can look up,

124
00:10:44,030 --> 00:10:52,520
search for who's part here and underneath you can see that it expects a path filled with a string with

125
00:10:52,820 --> 00:10:53,600
string value.

126
00:10:54,110 --> 00:10:55,790
So that's exactly what we have done here.

127
00:10:58,020 --> 00:11:08,650
So we have the spot and the value for the part that's Sigbrit Ashlock log, which is exactly as expected.

128
00:11:08,670 --> 00:11:12,180
And the question, the rest of it is pretty straightforward.

129
00:11:12,660 --> 00:11:18,870
We can just copy it from the example, from the documentation, make sure that the values are updated

130
00:11:18,870 --> 00:11:19,350
correctly.

131
00:11:20,020 --> 00:11:24,130
So now let's try to create this persistent volume because it will create.

132
00:11:24,780 --> 00:11:27,600
And now let's run like you still get.

133
00:11:30,740 --> 00:11:34,070
I can see that the position volume has been successfully created.

134
00:11:35,370 --> 00:11:39,140
And currently it is and then available state, so let's move on.

135
00:11:43,090 --> 00:11:48,520
Let us clean some of that storage for our application, create a persistent volume clean with the given

136
00:11:48,520 --> 00:11:55,510
specifications again within the same documentation, let us search for persistent volume claim.

137
00:11:57,300 --> 00:12:03,270
So here is an example, and as before, I'm just going to copy this and we'll make the changes accordingly.

138
00:12:06,860 --> 00:12:10,310
So let's call Danny Vilem as President Obama.

139
00:12:15,970 --> 00:12:24,130
And let's see the values according to the question, so the claim names should be claimed Ashlock Dash

140
00:12:24,130 --> 00:12:27,370
one, it should request for 50.

141
00:12:28,670 --> 00:12:33,410
Maybe vide of storage and the access more should be read right once.

142
00:12:34,840 --> 00:12:42,010
So we created our Peevey with a rewrite many, so this will fail to bind to that specific position volume,

143
00:12:42,010 --> 00:12:44,380
but yeah, we'll get to that later.

144
00:12:45,010 --> 00:12:46,500
So the name should be clean.

145
00:12:47,890 --> 00:12:49,630
Dash long, dash one.

146
00:12:51,790 --> 00:12:59,050
So the access mode is correct as per the question and let's see these storage.

147
00:13:00,380 --> 00:13:04,790
That looks correct, blame dash log, dash one, rewrite once.

148
00:13:06,650 --> 00:13:08,960
So let's create this process in volume claim.

149
00:13:13,960 --> 00:13:16,080
So that is complete, let's move on.

150
00:13:19,540 --> 00:13:21,700
What is the state of the position all in claim?

151
00:13:26,700 --> 00:13:33,000
Because you can see it in pending status as expected, because there was a mismatch between the access

152
00:13:33,000 --> 00:13:36,820
modes for Peevey and the PVC that we just created.

153
00:13:37,080 --> 00:13:38,430
So it is expected to.

154
00:13:39,900 --> 00:13:40,920
Being a pending St..

155
00:13:44,480 --> 00:13:46,460
What is the state of the opposition volume?

156
00:13:50,020 --> 00:13:51,120
It is still available.

157
00:13:56,220 --> 00:14:01,800
Why is the claim not bound to the available position volume, so we already explained that the reclaim

158
00:14:02,100 --> 00:14:07,140
the access mode is not the same for the PV and the privacy, so it will not bind.

159
00:14:09,950 --> 00:14:14,980
Read the assessment on the claim to binded, so let's update the BBC.

160
00:14:17,100 --> 00:14:19,140
So we're going to change it to rewrite many.

161
00:14:23,090 --> 00:14:24,050
Let's delete.

162
00:14:25,560 --> 00:14:27,030
The existing privacy.

163
00:14:30,510 --> 00:14:31,710
And created again.

164
00:14:39,260 --> 00:14:43,580
And now if you're on QVC, they'll get BVC, we can see that it is in our barnstead.

165
00:14:45,790 --> 00:14:49,180
And it is bound to be read blog posts in.

166
00:14:54,310 --> 00:14:56,980
You requested for 50, maybe, right?

167
00:14:57,010 --> 00:15:03,100
How much capacity is now available to the police, he can see that it has allocated the complete space,

168
00:15:03,100 --> 00:15:03,850
which is 100.

169
00:15:07,760 --> 00:15:14,150
I'm the developer to use the position volume claim as its storage, so let's replace the.

170
00:15:15,560 --> 00:15:18,110
Volume two persists in volume.

171
00:15:26,690 --> 00:15:28,940
So for this, again, let's make use of the example.

172
00:15:30,060 --> 00:15:31,710
We to search for clean name.

173
00:15:32,930 --> 00:15:38,210
And within the volume section, let us add in the persistent volume claim.

174
00:15:39,110 --> 00:15:41,600
And sort of the hotspot, because the.

175
00:15:42,600 --> 00:15:46,200
Position volume has already created with that, so we're going to change that.

176
00:15:49,730 --> 00:15:53,800
So the volume name can remain the same is going to add this.

177
00:15:55,670 --> 00:16:00,650
Some volume claim and the claim name should be claimed first dash one.

178
00:16:01,800 --> 00:16:06,470
That's validated that claimed Ashlock Bush won everything else will remain the same.

179
00:16:09,270 --> 00:16:11,970
So let's delete the part again.

180
00:16:13,360 --> 00:16:16,090
And once that is done, we will recreate a.

181
00:16:17,840 --> 00:16:20,390
All right, so now let us create the part again.

182
00:16:35,190 --> 00:16:42,960
And now within the describe Cuba, still, as you can see, that the volume is making its opposition

183
00:16:42,960 --> 00:16:43,710
volume claim.

184
00:16:44,980 --> 00:16:48,410
Of the name clean log dash one, so that is expected.

185
00:16:48,430 --> 00:16:49,170
So let's move on.

186
00:16:53,170 --> 00:16:58,090
What is the reclaimed policy said on the persistent volume period, Ashlock?

187
00:17:04,730 --> 00:17:07,250
So let's run Cuba, still describe B.V..

188
00:17:08,640 --> 00:17:10,800
And the reclaimed policy is routine.

189
00:17:16,050 --> 00:17:19,310
What would happen to the Peevey if the BBC was destroyed?

190
00:17:20,530 --> 00:17:26,500
So the BBC is not deleted, but is not available, so that's the correct option because it has got a

191
00:17:26,500 --> 00:17:31,120
reclaimed set of very clear policy of a rating.

192
00:17:32,970 --> 00:17:34,430
So that should be the correct option.

193
00:17:36,110 --> 00:17:38,510
Try deleting the privacy and notice what happens.

194
00:17:38,720 --> 00:17:42,560
Let's try to delete the privacy, even though it is bound to report.

195
00:17:48,180 --> 00:17:54,350
And you'll notice that even though it was a small claim was deleted, it will be in hanging straight

196
00:17:54,480 --> 00:17:59,190
and not be able to get any output out of this unless you're a radio controlled, see?

197
00:18:00,200 --> 00:18:03,200
And then if Iran could still get BVC.

198
00:18:04,450 --> 00:18:06,760
It will be stuck in a dominating state.

199
00:18:11,620 --> 00:18:17,920
Why is the PC stuck in dominating third, because it is used or referenced by the iPod, which is still

200
00:18:17,920 --> 00:18:18,310
running.

201
00:18:24,520 --> 00:18:31,240
Now, let's try to delete the part was deleted, let's wait for the complete report to be terminated

202
00:18:31,330 --> 00:18:33,030
and then we can check these cities again.

203
00:18:40,320 --> 00:18:42,570
All right, so the part has been deleted.

204
00:18:45,430 --> 00:18:48,730
And you can see that the BBC has also been deleted along with the.

205
00:18:52,160 --> 00:18:56,000
What is the status of privacy, so we already saw that it was deleted.

206
00:18:57,620 --> 00:19:00,560
What is the state of the Peevey, so let's run.

207
00:19:01,460 --> 00:19:07,610
Come OPV and you'll notice that the Peevey is still existing, but it has released.

208
00:19:08,910 --> 00:19:16,380
So the data is still intact because the processing volume, which is external to the port, has still

209
00:19:16,380 --> 00:19:18,750
intact on the BBC and the port have been deleted.

210
00:19:22,450 --> 00:19:23,630
So that was the last question.

211
00:19:23,650 --> 00:19:25,600
Thank you for joining me in The Situation video.

212
00:19:25,630 --> 00:19:27,010
I'll see you in the next one.
