⌂ Home

Access Modes and StorageClasses

Understand RWO, ROX, RWX, RWOP, and how manual StorageClasses behave in bare-metal and non-cloud Kubernetes clusters.

Access mode describes how a volume may be mounted. StorageClass describes how storage should be provisioned and bound. They complement each other, but they are not the same thing.

Core Concepts

ReadWriteOnce

One node can mount the volume for read and write. This is the common fit for single-instance stateful apps.

ReadOnlyMany and ReadWriteMany

Use these when many nodes need shared access. RWX needs a backend that truly supports concurrent writers.

ReadWriteOncePod

This is a stricter isolation model where a single Pod gets write access, typically with supported CSI drivers.

Manual StorageClasses

In non-cloud clusters, kubernetes.io/no-provisioner is common for NFS and local-storage teaching labs.

Manual Provisioning Flow

1

Choose access behavior

Start with the workload's concurrency need, not with a random backend.

2

Define the StorageClass

Use manual classes when the cluster will not dynamically create the backend volume for you.

3

Create the PV

Pre-create a volume whose access mode and backend match the intended claim.

4

Submit the PVC

The claim requests storage size, access mode, and class name so Kubernetes can bind correctly.

5

Schedule intelligently

Binding mode and node affinity matter most for local storage because the volume only exists on specific nodes.

Key point: The most common failure is requesting RWX from a backend that only behaves like RWO.

Representative YAML

Manual NFS StorageClass

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: nfs-manual
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: Immediate

Manual Local StorageClass

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: local-storage
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumer

Local PV

apiVersion: v1
kind: PersistentVolume
metadata:
  name: local-pv
spec:
  accessModes:
    - ReadWriteOnce
  storageClassName: local-storage
  local:
    path: /mnt/disks/ssd1

Access Modes At A Glance

ModeWho Can MountTypical Fit
ReadWriteOnceOne node with read-write accessSingle-instance databases and node-local persistence
ReadOnlyManyMany nodes, read-onlyShared static content
ReadWriteManyMany nodes, read-writeShared files, logs, and collaboration workloads
ReadWriteOncePodExactly one Pod with write accessStrict single-pod isolation
Design hint: Pick access mode from workload behavior first, then verify backend support.

How To Use It In Practice

Bare-metal teaching labs

Use manual NFS and local-storage classes where no cloud provisioner exists.

Scheduler-aware local disks

Use WaitForFirstConsumer so binding happens after Pod placement is known.

Avoid false assumptions

Do not ask for RWX unless the storage backend really supports multi-node shared writing.