Advertisement
Guest User

Untitled

a guest
Nov 21st, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. # Create a pod that reads and writes to the
  2. # NFS server via an NFS volume.
  3.  
  4. kind: Pod
  5. apiVersion: v1
  6. metadata:
  7. name: pod-using-nfs
  8. spec:
  9. # Add the server as an NFS volume for the pod
  10. volumes:
  11. - name: nfs-volume
  12. nfs:
  13. # URL for the NFS server
  14. server: devapinfs1.pomona-fr.grp
  15. path: /pomona/metro
  16.  
  17. # In this container, we'll mount the NFS volume
  18. # and write the date to a file inside it.
  19. containers:
  20. - name: nfsapp
  21. image: busybox
  22.  
  23. # Mount the NFS volume in the container
  24. volumeMounts:
  25. - name: nfs-volume
  26. mountPath: /var/nfs
  27.  
  28. # Write to a file inside our NFS
  29. command: ["/bin/sh"]
  30. args: ["-c", "while true; do date >> /var/nfs/data-1/dates.txt; sleep 5; done"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement