Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Create a pod that reads and writes to the
- # NFS server via an NFS volume.
- kind: Pod
- apiVersion: v1
- metadata:
- name: pod-using-nfs
- spec:
- # Add the server as an NFS volume for the pod
- volumes:
- - name: nfs-volume
- nfs:
- # URL for the NFS server
- server: devapinfs1.pomona-fr.grp
- path: /pomona/metro
- # In this container, we'll mount the NFS volume
- # and write the date to a file inside it.
- containers:
- - name: nfsapp
- image: busybox
- # Mount the NFS volume in the container
- volumeMounts:
- - name: nfs-volume
- mountPath: /var/nfs
- # Write to a file inside our NFS
- command: ["/bin/sh"]
- 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