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.yml
file from the defaults:helm show values oci://registry.indevops.com/saunafs-operator/nfs-ganesha > values.yml
Version
You can generate a values file and install a specific version by using the
--version
option with both thehelm show values
andhelm install
commandsEdit the
values.yml
and configure it to match your requirements. You will need to configure following parameters:Label Description path
Path to export via NFS. pseudo
Path where the export will be available on the server (required for NFS v4). accessType
Type of client access permitted to the mount point (RW, RO, MDONLY, MDONLY_RO). squash
Determines if the clients root user is mapped to a lower-privileged user or retains root access on the server. hostname
Address of the SaunaFS Master Server. port
Port to connect to on the Master Server. passwordSecret.name
Kubernetes secret that contains SaunaFS exports password. passwordSecret.key
Key inside the Kubernetes secret that holds the password. exposeExternally
If set to true, a Kubernetes LoadBalancer service will be created to expose the NFS gateway externally. nfsExportOptions
List of key-value pairs to configure Ganesha export settings. saunafsFsalOptions
List 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.yml
Name
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-name
flag to automatically assign a name.Namespace
If
passwordSecret
is 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-common
package is installed.apt install nfs-common
To 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/TCP
The NFS Server IP refers to the external IP address of the
nfs
service.The
nfs-internal
service 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.yml
Use 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