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/nodes-containers-volumes-adding.adoc
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,11 +37,11 @@ character.
37
37
|`'*'`
38
38
39
39
|`-m, --mount-path`
40
-
|Mount path inside the selected containers.
40
+
|Mount path inside the selected containers. 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 if the container is sufficiently privileged, such as the host `/dev/pts` files. It is safe to mount the host by using `/host`.
41
41
|
42
42
43
43
|`--path`
44
-
|Host path. Mandatory parameter for `--type=hostPath`.
44
+
|Host path. Mandatory parameter for `--type=hostPath`. 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 if the container is sufficiently privileged, such as the host `/dev/pts` files. It is safe to mount the host by using `/host`.
<2> The pod restart policy with possible values `Always`, `OnFailure`, and `Never`. The default value is `Always`.
108
108
<3> {product-title} defines a security context for containers which specifies whether they are allowed to run as privileged containers, run as a user of their choice, and more. The default context is very restrictive but administrators can modify this as needed.
109
109
<4> `containers` specifies an array of one or more container definitions.
110
-
<5> The container specifies where external storage volumes are mounted within the container. In this case, there is a volume for storing the default the CA bundle.
111
-
<6> Each container in the pod is instantiated from its own container image.
112
-
<7> Pods making requests against the {product-title} API is a common enough pattern that there is a `serviceAccount` field for specifying which service account user the pod should authenticate as when making the requests. This enables fine-grained access control for custom infrastructure components.
113
-
<8> The pod defines storage volumes that are available to its container(s) to use. In this case, it provides an ephemeral volume for a `secret` volume containing the default service account tokens.
110
+
<5> The container specifies where external storage volumes are mounted within the container. In this case, there is a volume for storing access to credentials the registry needs for making requests against the {product-title} API.
111
+
<6> Specify the volumes to provide for the pod. Volumes mount at the specified path. 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 if the container is sufficiently privileged, such as the host `/dev/pts` files. It is safe to mount the host by using `/host`.
112
+
<7> Each container in the pod is instantiated from its own container image.
113
+
<8> Pods making requests against the {product-title} API is a common enough pattern that there is a `serviceAccount` field for specifying which service account user the pod should authenticate as when making the requests. This enables fine-grained access control for custom infrastructure components.
114
+
<9> The pod defines storage volumes that are available to its container(s) to use. In this case, it provides an ephemeral volume for a `secret` volume containing the default service account tokens.
Copy file name to clipboardExpand all lines: modules/persistent-storage-hostpath-about.adoc
+26Lines changed: 26 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,3 +10,29 @@
10
10
In a production cluster, you would not use hostPath. Instead, a cluster administrator would provision a network resource, such as a GCE Persistent Disk volume, an NFS share, or an Amazon EBS volume. Network resources support the use of storage classes to set up dynamic provisioning.
11
11
12
12
A hostPath volume must be provisioned statically.
13
+
14
+
[IMPORTANT]
15
+
====
16
+
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 if the container is sufficiently privileged. It is safe to mount the host by using `/host`. The following example shows the `/` directory from the host being mounted into the container at `/host`.
Copy file name to clipboardExpand all lines: modules/persistent-storage-hostpath-pod.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,5 +37,5 @@ spec:
37
37
----
38
38
<1> The name of the pod.
39
39
<2> The pod must run as privileged to access the node's storage.
40
-
<3> The path to mount the hostPath share inside the privileged pod.
40
+
<3> The path to mount the host path share inside the privileged pod. 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 if the container is sufficiently privileged, such as the host `/dev/pts` files. It is safe to mount the host by using `/host`.
41
41
<4> The name of the `PersistentVolumeClaim` object that has been previously created.
Copy file name to clipboardExpand all lines: modules/persistent-storage-hostpath-static-provisioning.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ A pod that uses a hostPath volume must be referenced by manual (static) provisio
32
32
<1> The name of the volume. This name is how it is identified by persistent volume claims or pods.
33
33
<2> Used to bind persistent volume claim requests to this persistent volume.
34
34
<3> The volume can be mounted as `read-write` by a single node.
35
-
<4> The configuration file specifies that the volume is at `/mnt/data` on the cluster's node.
35
+
<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`.
Copy file name to clipboardExpand all lines: modules/persistent-storage-local-pod.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ spec:
33
33
claimName: local-pvc-name <3>
34
34
----
35
35
<1> The name of the volume to mount.
36
-
<2> The path inside the pod where the volume is mounted.
36
+
<2> The path inside the pod where the volume is mounted. 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 if the container is sufficiently privileged, such as the host `/dev/pts` files. It is safe to mount the host by using `/host`.
37
37
<3> The name of the existing persistent volume claim to use.
38
38
39
39
. Create the resource in the {product-title} cluster, specifying the file
Copy file name to clipboardExpand all lines: modules/storage-persistent-storage-azure-file-pod.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,5 +33,5 @@ spec:
33
33
claimName: claim1 <3>
34
34
----
35
35
<1> The name of the pod.
36
-
<2> The path to mount the Azure File share inside the pod.
36
+
<2> The path to mount the Azure File share inside the pod. 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 if the container is sufficiently privileged, such as the host `/dev/pts` files. It is safe to mount the host by using `/host`.
37
37
<3> The name of the `PersistentVolumeClaim` object that has been previously created.
Copy file name to clipboardExpand all lines: modules/storage-persistent-storage-pvc.adoc
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -101,6 +101,6 @@ spec:
101
101
persistentVolumeClaim:
102
102
claimName: myclaim <3>
103
103
----
104
-
<1> Path to mount the volume inside the pod
105
-
<2> Name of the volume to mount
106
-
<3> Name of the PVC, that exists in the same namespace, to use
104
+
<1> Path to mount the volume inside the pod.
105
+
<2> Name of the volume to mount. 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 if the container is sufficiently privileged, such as the host `/dev/pts` files. It is safe to mount the host by using `/host`.
106
+
<3> Name of the PVC, that exists in the same namespace, to use.
0 commit comments