You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/persistent-storage-hostpath-static-provisioning.adoc
+20-20Lines changed: 20 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -10,30 +10,30 @@ A pod that uses a hostPath volume must be referenced by manual (static) provisio
10
10
11
11
.Procedure
12
12
13
-
. Define the persistent volume (PV). Create a file, `pv.yaml`, with the `PersistentVolume` object definition:
13
+
. Define the persistent volume (PV) by creating a `pv.yaml` file with the `PersistentVolume` object definition:
14
14
+
15
15
[source,yaml]
16
16
----
17
-
apiVersion: v1
18
-
kind: PersistentVolume
19
-
metadata:
20
-
name: task-pv-volume <1>
21
-
labels:
22
-
type: local
23
-
spec:
24
-
storageClassName: manual <2>
25
-
capacity:
26
-
storage: 5Gi
27
-
accessModes:
28
-
- ReadWriteOnce <3>
29
-
persistentVolumeReclaimPolicy: Retain
30
-
hostPath:
31
-
path: "/mnt/data" <4>
17
+
apiVersion: v1
18
+
kind: PersistentVolume
19
+
metadata:
20
+
name: task-pv-volume <1>
21
+
labels:
22
+
type: local
23
+
spec:
24
+
storageClassName: manual <2>
25
+
capacity:
26
+
storage: 5Gi
27
+
accessModes:
28
+
- ReadWriteOnce <3>
29
+
persistentVolumeReclaimPolicy: Retain
30
+
hostPath:
31
+
path: "/mnt/data" <4>
32
32
----
33
-
<1> The name of the volume. This name is how it is identified by persistent volume claims or pods.
34
-
<2> Used to bind persistent volume claim requests to this persistent volume.
33
+
<1> The name of the volume. This name is how the volume is identified by persistent volume (PV) claims or pods.
34
+
<2> Used to bind persistent volume claim (PVC) requests to the PV.
35
35
<3> The volume can be mounted as `read-write` by a single node.
36
-
<4> The configuration file specifies that the volume is at `/mnt/data` on the cluster's node. Do not mount to the container root, `/`, or any path that is the same in the host and the container. This can corrupt your host system. It is safe to mount the host by using `/host`.
36
+
<4> The configuration file specifies that the volume is at `/mnt/data` on the cluster's node. To avoid corrupting your host system, do not mount to the container root, `/`, or any path that is the same in the host and the container. You can safely mount the host by using `/host`
37
37
38
38
. Create the PV from the file:
39
39
+
@@ -42,7 +42,7 @@ A pod that uses a hostPath volume must be referenced by manual (static) provisio
42
42
$ oc create -f pv.yaml
43
43
----
44
44
45
-
. Define the persistent volume claim (PVC). Create a file, `pvc.yaml`, with the `PersistentVolumeClaim` object definition:
45
+
. Define the PVC by creating a `pvc.yaml` file with the `PersistentVolumeClaim` object definition:
0 commit comments