For submit.yml.erb mount I used the NFS ,
- type: nfs
name: home
server: 172.31.82.164
path: /
destination_path: /home/ondemand
But I got this error soon i tried to launch the app :
error: error validating “STDIN”: error validating data: ValidationError(Pod.spec.volumes[1].nfs): missing required field “server” in io.k8s.api.core.v1.NFSVolumeSource; if you choose to ignore these errors, turn validation off with --validate=false
Without seeing more of the submit.yml.erb it is likely that you need to include the port for the server as well. In the example I posted that may be more clear where you can see the cold storage using nfs.
When you flip the path and destination_path entries, does it work as you expect?
I think the path is intended as the actual path to mount, and the destination_path is intended as the mount point in the container the path will be mounted at, which is semantically given in the doc example as:
The new config also does not work
- type: nfs
name: nfshome
host: 172.31.82.164:2049
path: /
destination_path: /var/nfs
Eventhough this pod.yml works fine
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: 172.31.82.164
path: /
In this container, we’ll mount the NFS volume
and write the date to a file inside it.
containers:
- name: app
image: alpine
# 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/dates.txt; sleep 5; done"]
I think that might be the easiest way forward as well.
Are you free in the afternoon? I’m about to sign off for the day but anytime after 1pm would be ideal, though we can do earlier if that works for your schedule better. I’m very flexible and happy to work around your best times.