This proof of concept shows how to automount NFS shares on OpenShift.
This repo uses openshift-toolbox image.
Create a namespace where everything else will be deployed to:
$ oc apply --kustomize namespace
Unless you are bringing your own NFS server, you can deploy one on OpenShift:
$ oc apply --kustomize nfs-server
Obtain the IP address of the NFS server
$ oc get svc --namespace automount-nfs-poc nfs-server --output jsonpath='{.spec.clusterIP}'
Update the NFS IP address:
$ vi automount/extra.nfs
Deploy automount daemonset:
$ oc apply -k automount
Deploy a test pod:
$ oc apply --kustomize test-pod
$ oc delete --kustomize namespace
- Automount doesn't seem to unmount unused volumes after a timeout