This is the solution video for the persistent volume and possession volume, claims Lappe.
First question is we have deployed a pod, inspect the pod and wait for it to start running, so it's
deployed in the default namespace.
And here we can see that apart by the name of webapp has been deployed and the default in and it is
now in no running state.
The applications, tools, logs at the location slash log app, dot log viewed the logs.
OK, so to view the logs will run the exact command.
And then check out that for a while within the port, so steel exec webapp space will be a double dash.
And here I'm running cat and finally.
So here we can see the logs for that specific part, it seems to be working fine.
If the pod was to get deleted now, would you be able to view these logs?
So for this, we'll have to check whether there is a volume which is attached to the spot and if it
is attached to that specific folder, so let's run cubicle, describe pod.
And inspect if it has any value elements.
So the only volume that you see here is for the default token, for the service account, the secret,
and other than that, we do not see any other amount and see the mount section that is just for the
service account.
We do not see anything for the log directory.
So in this case, it does not using a volume that means that if the part is deleted, will not be able
to access that file again.
Configure a volume to store these logs, aguaje log webapp on the horse to use the spec given on the
right.
So you have to use a hotspot type volume and here is the hotspot.
And then we have the volume mount.
So essentially we are just going to update the same pod with the volume and the volume mount.
So let's again make use of documentation because there's no way to add a volume and a volume amount
to a pod.
So let's make use of the documentation and look at the examples there.
So just type in volumes and the search bar here and open the first result called volumes and let us
look up some of the examples here.
Yes, and this should be good enough.
There is one for Ebb's, I'm not sure if there is one for hotspots, so let's search for hotspot.
But if it is not there, that's all right.
We can just make use of the very first example.
So there is an example here for hotspots, so we can make use of this as well.
So first things first, let us get the poor definition file.
For the Web part.
For will use Oyamel.
And redirect it to a file, so let's call the file Port Dot Yama.
And now we are going to update this part, so let's scroll down all the way to the bottom, it has got
a lot of extra feel that we really do not need.
So I'm going to delete all of them.
So here's a sample of the volume.
You can also read for this part, let's use make use of the documentation.
The name is even similar.
I'm going to delete everything under this, so I used hundreds to clear out all the lines.
So it's going to delete the lines.
So that should be good.
Gives us a clean slate to proceed.
So the next thing that we're going to add as the volume mounts.
Just going to copy it from the documentation here.
And we'll change it in accordance to.
The question let's see if there is a name or volume which is specified, looks like there isn't.
So let's call it log volume or something of that sort.
And the amount but let us keep it from the question.
That should be log.
Next, let's define the volume sections that should come directly on the containers, on the spec,
and yea, let's add the hotspot type volume.
Let's make use of the example here.
So the name, again, will make change to that and let's copy this template here.
So as you can see, it is a list under the volumes, beginning with the name here.
And this case, so let's change that to the name that we used, which is log.
The volume in our volume mounts definition.
And the hotspot let us change it in accordance to the question so we can copy that from the question,
it should be water log webapp.
Let's delete this.
And will peace disvalue.
This is just a comment that's all right if it's copied.
But make sure that it is correctly indented, so under the most part, yeah, it should be indented
correctly.
I'm just going to remove this just to make sure that it's clear.
That looks all right.
Everything else should be OK.
So first things first, let us delete the existing pod called Webapp.
And let's wait for this to terminate completely, and then once that is done, we can proceed to create
our new pod with the volumes and the volume out.
This can take a few seconds or a minute, so let's wait for it to terminate completely.
All right, so that was deleted, so let's try to create the pod using the pod template that we just
created.
So it looks like there was a mistake, so let's go ahead and corrected it, and it's online 84.
So I'm just going to hit Cole 84.
Oh, take me to.
The volume down section.
It's supposed to have a MANPAD and the name.
All right, so here you'll see that the indentation is incorrect for Walliams.
It should come under this section on the same vertical line as containers, that's the result.
That's the reason why this failed.
Now, it should be correct.
Rest of it look, OK, so let's try that again.
And this time it has created the pod.
Let's run still description and check if it's listing the volume and the whole amount.
And here now, you can see that on the volumes, we have the log dash volume, which is the name of
the volume that we just created, and it is using most spot.
And this is the part.
And on the volume also, you can see the.
That the same volume is mounted on the slash log, so that looks correctly validated.
All right, so moving on next, we had to create a persistent volume with the given specification.
So for this, let's again make use of the documentation.
All right, so we are going to create a hotspot type for system volume and again, for those let's make
use of an example here.
So in the documentation as of this recording, there is no example for us.
But let's try to see if we can find it.
So there is no direct.
Example for a hotspot for persistent volume.
So in this case, let us rely on a template which is for a different type of storage.
I'm going to search for kind the call to persistent volume, and here we have an example for Neff's,
but that's all right.
Most of the options are the same.
So I'm just going to copy.
Some of the lines from here and let's create a new file called Peridot Yamal.
And let's change the values, so there should be petri dish analytics or production log.
Sighs Let us make sure it does.
As for the question.
We don't need the volume mode, so I'm just going to run, need to delete it and let's the access more
to read write many.
And next, we'll have to add the host, but so in this example from the documentation, there is no
example for those, but it is for any first part.
I'll show you another way to look that up.
Essentially, we can just type in whose part and the part.
As for what's described in the question.
All right, so that looks OK, but, yeah, before we create this, let's run cubicle, explain what
sustained volume.
That's the recursive and I'm going to use less and to see the options for whose part we can look up,
search for who's part here and underneath you can see that it expects a path filled with a string with
string value.
So that's exactly what we have done here.
So we have the spot and the value for the part that's Sigbrit Ashlock log, which is exactly as expected.
And the question, the rest of it is pretty straightforward.
We can just copy it from the example, from the documentation, make sure that the values are updated
correctly.
So now let's try to create this persistent volume because it will create.
And now let's run like you still get.
I can see that the position volume has been successfully created.
And currently it is and then available state, so let's move on.
Let us clean some of that storage for our application, create a persistent volume clean with the given
specifications again within the same documentation, let us search for persistent volume claim.
So here is an example, and as before, I'm just going to copy this and we'll make the changes accordingly.
So let's call Danny Vilem as President Obama.
And let's see the values according to the question, so the claim names should be claimed Ashlock Dash
one, it should request for 50.
Maybe vide of storage and the access more should be read right once.
So we created our Peevey with a rewrite many, so this will fail to bind to that specific position volume,
but yeah, we'll get to that later.
So the name should be clean.
Dash long, dash one.
So the access mode is correct as per the question and let's see these storage.
That looks correct, blame dash log, dash one, rewrite once.
So let's create this process in volume claim.
So that is complete, let's move on.
What is the state of the position all in claim?
Because you can see it in pending status as expected, because there was a mismatch between the access
modes for Peevey and the PVC that we just created.
So it is expected to.
Being a pending St..
What is the state of the opposition volume?
It is still available.
Why is the claim not bound to the available position volume, so we already explained that the reclaim
the access mode is not the same for the PV and the privacy, so it will not bind.
Read the assessment on the claim to binded, so let's update the BBC.
So we're going to change it to rewrite many.
Let's delete.
The existing privacy.
And created again.
And now if you're on QVC, they'll get BVC, we can see that it is in our barnstead.
And it is bound to be read blog posts in.
You requested for 50, maybe, right?
How much capacity is now available to the police, he can see that it has allocated the complete space,
which is 100.
I'm the developer to use the position volume claim as its storage, so let's replace the.
Volume two persists in volume.
So for this, again, let's make use of the example.
We to search for clean name.
And within the volume section, let us add in the persistent volume claim.
And sort of the hotspot, because the.
Position volume has already created with that, so we're going to change that.
So the volume name can remain the same is going to add this.
Some volume claim and the claim name should be claimed first dash one.
That's validated that claimed Ashlock Bush won everything else will remain the same.
So let's delete the part again.
And once that is done, we will recreate a.
All right, so now let us create the part again.
And now within the describe Cuba, still, as you can see, that the volume is making its opposition
volume claim.
Of the name clean log dash one, so that is expected.
So let's move on.
What is the reclaimed policy said on the persistent volume period, Ashlock?
So let's run Cuba, still describe B.V..
And the reclaimed policy is routine.
What would happen to the Peevey if the BBC was destroyed?
So the BBC is not deleted, but is not available, so that's the correct option because it has got a
reclaimed set of very clear policy of a rating.
So that should be the correct option.
Try deleting the privacy and notice what happens.
Let's try to delete the privacy, even though it is bound to report.
And you'll notice that even though it was a small claim was deleted, it will be in hanging straight
and not be able to get any output out of this unless you're a radio controlled, see?
And then if Iran could still get BVC.
It will be stuck in a dominating state.
Why is the PC stuck in dominating third, because it is used or referenced by the iPod, which is still
running.
Now, let's try to delete the part was deleted, let's wait for the complete report to be terminated
and then we can check these cities again.
All right, so the part has been deleted.
And you can see that the BBC has also been deleted along with the.
What is the status of privacy, so we already saw that it was deleted.
What is the state of the Peevey, so let's run.
Come OPV and you'll notice that the Peevey is still existing, but it has released.
So the data is still intact because the processing volume, which is external to the port, has still
intact on the BBC and the port have been deleted.
So that was the last question.
Thank you for joining me in The Situation video.
I'll see you in the next one.