1
00:00:00,620 --> 00:00:04,130
Hello and welcome to this lecture on persistent volumes.

2
00:00:04,130 --> 00:00:08,230
My name is Mumshad Mannambeth in the last lecture.

3
00:00:08,240 --> 00:00:10,280
We learned about volumes.

4
00:00:10,280 --> 00:00:18,630
Now we will discuss Persistent Volumes in Kubernetes. When we created volumes in the previous section

5
00:00:18,700 --> 00:00:25,330
We configured volumes within the pod definition file so every configuration information required to

6
00:00:25,330 --> 00:00:30,490
configure storage for the volume goes within the pod definition file.

7
00:00:30,520 --> 00:00:37,240
Now when you have a large environment with a lot of users deploying a lot of pods the users would have

8
00:00:37,240 --> 00:00:40,520
to configure storage every time for each pod.

9
00:00:40,960 --> 00:00:47,560
Whatever storage solution is used the users who deploys the pods would have to configure that on all

10
00:00:47,560 --> 00:00:53,300
pod definition files in his own environment every time it changes to be made.

11
00:00:53,410 --> 00:00:57,410
The user would have to make them on all of his pods.

12
00:00:57,460 --> 00:01:01,510
Instead you would like to manage storage more centrally.

13
00:01:01,750 --> 00:01:08,230
You would like it to be configured in a way that an administrator can create a large pool of storage

14
00:01:08,680 --> 00:01:13,440
and then have users carve out pieces from it has required.

15
00:01:13,570 --> 00:01:16,900
That is where persistent volumes can help us.

16
00:01:16,900 --> 00:01:23,980
A persistent volume is a cluster wide pool of storage volumes configured by an administrator to be used

17
00:01:23,980 --> 00:01:28,240
by users deploying applications on the Cluster.

18
00:01:28,390 --> 00:01:36,630
The users can now select storage from this pool using persistent volume claims let us now create a persistent

19
00:01:36,630 --> 00:01:37,510
volume.

20
00:01:37,530 --> 00:01:44,040
We start with the base template and update the API version set the client to persistent volume and

21
00:01:44,100 --> 00:01:52,970
name it pv-vol1 under the specs section specify the access modes access mode defines how

22
00:01:53,060 --> 00:02:01,100
a volume should be mounted on the hosts whether in a read only mode or read write mode etc. The supported

23
00:02:01,100 --> 00:02:03,230
values are read only.

24
00:02:03,320 --> 00:02:12,370
Many read write ones or read write many next is the capacity specify the amount of storage to be reserved

25
00:02:12,520 --> 00:02:17,020
for this persistent volume which is set to 1 GB here.

26
00:02:17,020 --> 00:02:19,020
Next comes the volume type.

27
00:02:19,180 --> 00:02:25,090
We will start with the host path option that uses storage from the nodes local directory.

28
00:02:25,090 --> 00:02:28,960
Remember this option is not to be used in a production environment.

29
00:02:29,990 --> 00:02:32,570
To create the volume run kubectrl

30
00:02:32,570 --> 00:02:35,370
Create command and to list the created volume.

31
00:02:35,390 --> 00:02:40,310
Run the kubectrl get persistent in volume command replace the host.

32
00:02:40,300 --> 00:02:47,300
Path option with one of the supported storage solutions as we saw in the previous lecture like AWS elastic

33
00:02:47,300 --> 00:02:51,760
blocks store etc well that's it on persistent volumes.

34
00:02:51,760 --> 00:02:58,210
In this lecture in the next lecture we will look at how we use persistent volume claims to claim the

35
00:02:58,210 --> 00:03:01,060
volume configured with persistent volumes.
