Creating a persistent volume for NFS storage plugin
The administrator is responsible for creating volumes (PV). The administrator assigns some external thing (partition, entire device, NFS volume, whatever) to a PV.
- Login to OpenShift with an admin user
- Create persistent volume:
oc create -f persistent-volume-nfs.yaml
- Check status of persistent volume:
oc get pv
Creating a persistent volume claim
The end-user/developer/user/whatever is responsible for making a request for a volume (PVC). They get assigned some volume, and they don’t really know what it is. Keep in mind that there is a 1:1 mapping between PV and PVCs.
- Login to OpenShift
- Create persistent volume claim:
oc create -f persistent-volume-claim.yaml
The source code can be found on my Github page: https://github.com/sebastianfaulhaber/openshift-v3-showcase/tree/master/openshift-resources