305-998-7702 | 415-800-2922 info@rx-m.com

Volume Access Modes

Learn how to put the latest open source technology into practice with hands-on training, delivered by industry experts, aligned to your desired business outcomes

Persistent Volumes use the accesModes array to ensure that the resulting volume mounts in a way supported by the resource provider’s filesystem.

There are three access modes supported by Kubernetes:

  • ReadWriteOnce (RWO) – A single node may mount the volume with read-write permissions
  • ReadOnlyMany (ROX) – Many nodes may mount the volume with read-only permissions
  • ReadWriteMany (RWX) – Many nodes may mount the volume with read-write permissions

Below is an example of a PersistentVolume that allows ReadWriteOnce and ReadOnlyMany access modes

apiVersion: v1
kind: PersistentVolume
metadata:
  name: app-pv
spec:
  capacity:
    storage: 50Gi
  accessModes:
    - ReadWriteOnce
    - ReadOnlyMany
  persistentVolumeReclaimPolicy: Retain
  hostPath:
    path: "/app/logs"

Learn more about access modes for volumes