April 2018
Intermediate to advanced
468 pages
14h 34m
English
When containers want access to some persistent storage they make a claim (or rather, the developer and cluster administrator coordinate on necessary storage resources to claim). Here is a sample claim that matches the persistent volume from the previous section:
kind: PersistentVolumeClaimapiVersion: v1metadata: name: storage-claimspec: accessModes: - ReadWriteOnce resources: requests: storage: 80Gi storageClassName: "normal" selector: matchLabels: release: "stable" matchExpressions: - {key: capacity, operator: In, values: [80Gi, 100Gi]}
The name storage-claim will be important later when mounting the claim into a container.
The access mode in the spec is ReadWriteOnce, which means if the claim is satisfied ...
Read now
Unlock full access