OpenShift Quicktip: Testdriving persistent storage with NFS

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.

  1. Login to OpenShift with an admin user
  2. Create persistent volume:
oc create -f persistent-volume-nfs.yaml
  1. 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.

  1. Login to OpenShift
  2. 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

Leave a Reply

Your email address will not be published. Required fields are marked *