liveBook · Manning

Readwriteonce

As explained in Kubernetes in Action, Second Edition

ReadWriteOnce is a Kubernetes volume access mode that permits a volume to be attached read-write to one node, while multiple pods on that node may use it.

ReadWriteOnce is a Kubernetes volume access mode that lets one node attach a volume for read-write use. Multiple pods may use it when they run on that same node. section 10.2.4

The scheduling and attachment behavior is the important distinction:

  • Pods scheduled on the volume's node can run and read or write shared files. section 10.2.4
  • Pods scheduled on another node can remain in ContainerCreating because the volume cannot attach to multiple nodes. section 10.2.4
  • Unlike ReadWriteOncePod, ReadWriteOnce permits several pods on one node to use the volume simultaneously. section 10.2.4

Several pods sharing one volume

A BusyBox pod mounts a ReadWriteOnce PersistentVolumeClaim at /mnt/volume, lists existing files, and writes a file named after its hostname. Pods on the same node run successfully and see one another's files; pods on another node wait for attachment.

How Kubernetes in Action, Second Edition covers it

How deep it goes
Explains node attachment, pod scheduling effects, and diagnostic events, but does not detail storage-provider implementation.
Examples
Demonstrates BusyBox pods writing hostname files, inspecting logs, and failing cross-node attachment.
What it assumes
Assumes PersistentVolume and PersistentVolumeClaim concepts while establishing the distinction from ReadWriteOncePod.
What you can do after
Diagnose scheduling and attachment behavior by comparing pod nodes, statuses, and volume events.
How it connects
Connects PersistentVolumes and PersistentVolumeClaims with pods, nodes, and ReadWriteOncePod.

Also explained in

Compare how 2 books explain readwriteonce →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kubernetes in Action, Second Edition. The section links point to the parts of the book it draws on.