Home > Workload Solutions > Container Platforms > Red Hat OpenShift Container Platform > Archive > Deployment Guide—Red Hat OpenShift Container Platform 4.2 > Creating a pod using NFS PVC
To create a pod using NFS PVC:
apiVersion: v1
kind: Pod
metadata:
name: <pod name>
spec:
containers:
- name: <container name>
image: <image name>
volumeMounts:
- mountPath: "<mount point>"
name: <volume name>
volumes:
- name: <volume name>
persistentVolumeClaim:
claimName: <nfs persistent volume claim>
We used the following nfspod.yaml file:
apiVersion: v1
kind: Pod
metadata:
name: nfspod
spec:
containers:
- name: myfrontend
image: nginx
volumeMounts:
- mountPath: "/var/www/html"
name: nfsshare
volumes:
- name: nfsshare
persistentVolumeClaim:
claimName: nfspvc
oc apply -f nfspod.yaml
oc exec -it nfspod -- df -h /var/www/html
Filesystem Size Used Avail Use% Mounted on
100.82.46.61:/nfspv 50G 4.1G 46G 9% /var/www/html
100.82.46.61 is the NFS server.