# This mounts the nfs volume claim into /mnt and continuously
# overwrites /mnt/index.html with the time and hostname of the pod. 
apiVersion: v1
kind: Pod
metadata:  
  name: ubuntu-pod
spec:      
  containers:  
  - image: ubuntu:16.04
    command: 
    - sh          
    - -c          
    - 'while true; do date > /mnt/test/index.html; hostname >> /mnt/test/index.html; sleep $(($RANDOM % 5 + 5)); done' 
    imagePullPolicy: IfNotPresent        
    name: ubuntu-pvc  
    volumeMounts:
    - mountPath: "/mnt/test"
      name: nfs-test
  volumes:
  - name: nfs-test
    persistentVolumeClaim:          
      claimName: nfs-pvc

#    - name: nfs-test
#      hostPath:
#        path: /home/supermap/data


