Skip to content

Setup nfs server in container

Chakradhar Rao Jonagam edited this page Oct 13, 2016 · 1 revision
git clone https://github.com/ErezHorev/dockerized_nfs_server.git
./start.sh share1 /share2 /share3 /share4 /share5 /share6 /share7 
export NFS_SERVER=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' mynfs)

for k in {1..6}
do
oc create -f - <<PV
apiVersion: "v1"
kind: "PersistentVolume"
metadata:
 name: "pv0$k"
spec:
 capacity:
   storage: "100Mi"
 accessModes:
   - "ReadWriteOnce"
 nfs:
   path: "/exports/share1"
   server: "$NFS_SERVER"
 persistentVolumeReclaimPolicy: "Recycle"
PV
done;
Clone this wiki locally