mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
OCPBUGS-9451: Volume mounts name and volume name matched in yaml file for local storage
This commit is contained in:
committed by
openshift-cherrypick-robot
parent
b325785efb
commit
07cd78d607
@@ -23,15 +23,16 @@ declares the persistent volume claim inside a pod:
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
spec:
|
||||
...
|
||||
# ...
|
||||
containers:
|
||||
volumeMounts:
|
||||
- name: local-disks <1>
|
||||
mountPath: /data <2>
|
||||
volumes:
|
||||
- name: localpvc
|
||||
- name: local-disks
|
||||
persistentVolumeClaim:
|
||||
claimName: local-pvc-name <3>
|
||||
# ...
|
||||
----
|
||||
<1> The name of the volume to mount.
|
||||
<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`.
|
||||
|
||||
Reference in New Issue
Block a user