July 2018
Intermediate to advanced
504 pages
11h 34m
English
Once the PV resource is available, any OpenShift user can create a PVC to request storage and later use that PVC to attach it as a volume to containers in pods.
Users should create PVC definitions using either YAML or JSON syntax. The following example shows a claim that requests 1 GiB of persistent storage with ReadWriteOnce capabilities:
# cat pvc-db.yamlapiVersion: v1kind: PersistentVolumeClaimmetadata: name: pvc-db spec: accessModes: - ReadWriteOnce resources: requests: storage: 1Gi
Now, we are able to create the corresponding API entity—PVC:
# oc create -f pvc-db.yaml ...
Read now
Unlock full access