NFS Ganesha
Both SaunaFS and Sarkan support access via the NFS protocol, making it easy to integrate with a wide range of systems and applications that rely on standard file system interfaces. This allows clients to mount exported directories using familiar NFS tools without requiring a native client.
NFS-Ganesha is a user-mode NFS v3, v4, and v4.1 file server that operates on most UNIX/Linux systems. SaunaFS utilizes NFS-Ganesha to provide NFS v3 and v4 services.
For additional details and documentation on configuring specific options and advanced setups for NFS-Ganesha visit here.
Installation
To enable NFS-based access to SaunaFS, you can install the NFS server component in your Kubernetes cluster using a Helm chart. This approach allows you to configure and deploy the server using standard Helm commands.
Generate a new
values.ymlfile from the defaults:helm show values oci://registry.indevops.com/saunafs-operator/nfs-ganesha > values.ymlVersion
You can generate a values file and install a specific version by using the
--versionoption with both thehelm show valuesandhelm installcommandsEdit the
values.ymland configure it to match your requirements. You will need to configure following parameters:Label Description pathPath to export via NFS. pseudoPath where the export will be available on the server (required for NFS v4). accessTypeType of client access permitted to the mount point (RW, RO, MDONLY, MDONLY_RO). squashDetermines if the clients root user is mapped to a lower-privileged user or retains root access on the server. hostnameAddress of the SaunaFS Master Server. portPort to connect to on the Master Server. passwordSecret.nameKubernetes secret that contains SaunaFS exports password. passwordSecret.keyKey inside the Kubernetes secret that holds the password. exposeExternallyIf set to true, a Kubernetes LoadBalancer service will be created to expose the NFS gateway externally. nfsExportOptionsList of key-value pairs to configure Ganesha export settings. saunafsFsalOptionsList of key-value pairs to configure SaunaFS FSAL settings. Deploy to the Kubernetes cluster:
helm install "<NAME>" \ oci://registry.indevops.com/saunafs-operator/nfs-ganesha \ --create-namespace -n "<NAMESPACE>" \ -f ./values.ymlName
It's possible to deploy multiple instances of NFS Ganesha. However, each instance must have a unique name within the Kubernetes cluster to ensure proper identification and management. Alternatively, you may use the
--generate-nameflag to automatically assign a name.Namespace
If
passwordSecretis specified, the Helm release must be deployed in the same namespace as the provided secret.Wait until Ganesha pod is running:
kubectl --namespace <NAMESPACE> rollout status deployment <NAME>
Mounting deployed NFS export
Make sure
nfs-commonpackage is installed.apt install nfs-commonTo mount a deployed NFS export, use the following command:
mount "<NFS SERVER IP>:/<PSEUDO PATH>" "/<LOCAL PATH>"NFS Server IP
The list of NFS services can be obtained by executing the following command. The service names correspond to the names of the Helm deployments.
$ kubectl get svc NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) nfs LoadBalancer 10.109.67.104 10.20.33.14 2049:32223/TCP,111:31097/TCP nfs-internal ClusterIP 10.105.42.221 <none> 2049/TCP,111/TCPThe NFS Server IP refers to the external IP address of the
nfsservice.The
nfs-internalservice is intended for internal use within the Kubernetes cluster to facilitate communication with the NFS service.
Upgrading
Check for new configuration options since the last upgrade:
helm show values oci://registry.indevops.com/saunafs-operator/nfs-ganesha > values.ymlUse following command to upgrade the driver:
helm upgrade "<NAME>" \ oci://registry.indevops.com/saunafs-operator/nfs-ganesha \ -n "<NAMESPACE>" -f ./values.yml
Version
You can generate a values file and upgrade to a specific version by using the --version option with both the helm show values and helm upgrade commands
