WEBVTT

00:00.620 --> 00:04.130
Hello and welcome to this lecture on persistent volumes.

00:04.130 --> 00:08.230
My name is Mumshad Mannambeth in the last lecture.

00:08.240 --> 00:10.280
We learned about volumes.

00:10.280 --> 00:18.630
Now we will discuss Persistent Volumes in Kubernetes. When we created volumes in the previous section

00:18.700 --> 00:25.330
We configured volumes within the pod definition file so every configuration information required to

00:25.330 --> 00:30.490
configure storage for the volume goes within the pod definition file.

00:30.520 --> 00:37.240
Now when you have a large environment with a lot of users deploying a lot of pods the users would have

00:37.240 --> 00:40.520
to configure storage every time for each pod.

00:40.960 --> 00:47.560
Whatever storage solution is used the users who deploys the pods would have to configure that on all

00:47.560 --> 00:53.300
pod definition files in his own environment every time it changes to be made.

00:53.410 --> 00:57.410
The user would have to make them on all of his pods.

00:57.460 --> 01:01.510
Instead you would like to manage storage more centrally.

01:01.750 --> 01:08.230
You would like it to be configured in a way that an administrator can create a large pool of storage

01:08.680 --> 01:13.440
and then have users carve out pieces from it has required.

01:13.570 --> 01:16.900
That is where persistent volumes can help us.

01:16.900 --> 01:23.980
A persistent volume is a cluster wide pool of storage volumes configured by an administrator to be used

01:23.980 --> 01:28.240
by users deploying applications on the Cluster.

01:28.390 --> 01:36.630
The users can now select storage from this pool using persistent volume claims let us now create a persistent

01:36.630 --> 01:37.510
volume.

01:37.530 --> 01:44.040
We start with the base template and update the API version set the client to persistent volume and

01:44.100 --> 01:52.970
name it pv-vol1 under the specs section specify the access modes access mode defines how

01:53.060 --> 02:01.100
a volume should be mounted on the hosts whether in a read only mode or read write mode etc. The supported

02:01.100 --> 02:03.230
values are read only.

02:03.320 --> 02:12.370
Many read write ones or read write many next is the capacity specify the amount of storage to be reserved

02:12.520 --> 02:17.020
for this persistent volume which is set to 1 GB here.

02:17.020 --> 02:19.020
Next comes the volume type.

02:19.180 --> 02:25.090
We will start with the host path option that uses storage from the nodes local directory.

02:25.090 --> 02:28.960
Remember this option is not to be used in a production environment.

02:29.990 --> 02:32.570
To create the volume run kubectrl

02:32.570 --> 02:35.370
Create command and to list the created volume.

02:35.390 --> 02:40.310
Run the kubectrl get persistent in volume command replace the host.

02:40.300 --> 02:47.300
Path option with one of the supported storage solutions as we saw in the previous lecture like AWS elastic

02:47.300 --> 02:51.760
blocks store etc well that's it on persistent volumes.

02:51.760 --> 02:58.210
In this lecture in the next lecture we will look at how we use persistent volume claims to claim the

02:58.210 --> 03:01.060
volume configured with persistent volumes.

