Skip to content

Commit b861992

Browse files
authored
Merge pull request #31908 from s-kawamura-w664/pv_accessmodes
Add that pv's access modes are not constraints on the volume.
2 parents 94ec1b2 + f26337f commit b861992

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

content/en/docs/concepts/storage/persistent-volumes.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,15 @@ In the CLI, the access modes are abbreviated to:
540540
* RWX - ReadWriteMany
541541
* RWOP - ReadWriteOncePod
542542

543+
{{< note >}}
544+
Kubernetes uses volume access modes to match PersistentVolumeClaims and PersistentVolumes.
545+
In some cases, the volume access modes also constrain where the PersistentVolume can be mounted.
546+
Volume access modes do **not** enforce write protection once the storage has been mounted.
547+
Even if the access modes are specified as ReadWriteOnce, ReadOnlyMany, or ReadWriteMany, they don't set any constraints on the volume.
548+
For example, even if a PersistentVolume is created as ReadOnlyMany, it is no guarantee that it will be read-only.
549+
If the access modes are specified as ReadWriteOncePod, the volume is constrained and can be mounted on only a single Pod.
550+
{{< /note >}}
551+
543552
> __Important!__ A volume can only be mounted using one access mode at a time, even if it supports many. For example, a GCEPersistentDisk can be mounted as ReadWriteOnce by a single node or ReadOnlyMany by many nodes, but not at the same time.
544553

545554

0 commit comments

Comments
 (0)