To create a PVC using NFS:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: nfspvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 50Gi
Note: A PVC created using the YAML file looks for an available PV. When it finds a PV that meets the needs of the claim, the PV and the PVC bind.
oc get pv nfspv
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE
nfspv 50Gi RWO Retain Bound default/nfspvc 42m
oc get pvc
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
nfspvc Bound nfspv 50Gi RWO 16s