Using ganesha-nfs-server as a RWX dynamic provisioner for POCs
Prerequisites
- An OCP cluster
- The kustomize binary in your path
- A version of the oc client binary that allows use of the
-k
or--kustomize
option - A dynamic provisioner set as your default storage class, or a manually created persistentVolume of size 60Gi or 100Gi that supports the
RWO
accessMode
Installing ganesha-nfs-server
-
Clone the cp4mcm-samples repo:
git clone git@github.com:IBM/cp4mcm-samples.git
-
Change directories into the cp4mcm-samples/ganesha-nfs-server/overlays directory.
cd cp4mcm-samples/ganesha-nfs-server/overlays/
-
Decide whether you want to a 60Gi volume or a 100Gi volume to use as persistent volume for ganesha-nfs-server, then choose between one of the following two commands to execute:
60Gi
:oc apply -k ./size-60gi/
100Gi
:oc apply -k ./size-100gi/
-
If you have a dynamic provisioner set as your default storage class, you are done. Otherwise, you must create a persistent volume to satisfy the PersistentVolumeClaim created; see the pvc for details.
oc get pvc ganesha-nfs -n default -o json
For more information on PersistentVolumes and PersistentVolumeClaims, see https://kubernetes.io/docs/concepts/storage/persistent-volumes/.
-
Verify that the
nfs-provisioner-xyz-123
pod is running in thedefault
namespace:oc get pods -n default
-
You are now ready to use the
ganesha-nfs
storage class for any products that require theRWX
accessMode.
Troubleshooting
If you believe that something was misconfigured and would like to re-install ganesha-nfs-server, complete the following steps:
-
Delete each of the resources that were created when you ran the
oc apply -k ./size-60gi
oroc apply -k ./size-100gi
commands. -
Run the
oc apply -k...
command from the step 3 in the Installing ganesha-nfs-server section to set up 60Gi volume or a 100Gi volume again.