Getting started with NFS Subdir External Provisioner and OVHcloud File Storage Service
Find out how to use the NFS Subdir External Provisioner to provision Kubernetes persistent volumes from an OVHcloud File Storage Service NFS share.
Objective
This guide explains how to deploy the NFS Subdir External Provisioner on a Kubernetes cluster to dynamically provision persistent volumes from an OVHcloud File Storage Service NFS share.
This approach is compatible with OVHcloud Managed Kubernetes Service (MKS) and self-managed Kubernetes environments running on OVHcloud Public Cloud instances.
The NFS Subdir External Provisioner does not manage the lifecycle of the underlying NFS share. Instead, it automatically creates a dedicated subdirectory inside an existing share for each PersistentVolumeClaim (PVC), making storage available to pods with ReadWriteMany (RWX) access. This approach is simpler to operate than Manila CSI but trades off features such as snapshots and per-PVC capacity enforcement.
Architecture
When a PVC is created against the provisioner's StorageClass, the provisioner pod mounts the NFS share root, creates a subdirectory named after the PVC, and binds a PersistentVolume (PV) to it. Pods then mount only their subdirectory, not the entire share.
Requirements
- A Kubernetes cluster whose nodes are deployed on a private network with access to the File Storage Service share — compatible with OVHcloud Managed Kubernetes Service (MKS) and self-managed Kubernetes clusters running on OVHcloud Public Cloud instances
- An OVHcloud File Storage Service NFS share in the same region and on the same private network as your cluster
- Helm installed on your workstation — see the How to install Helm on OVHcloud Managed Kubernetes Service guide
- Basic knowledge of operating a Kubernetes cluster — see the Deploying a Hello World application guide
- Optional — OVHcloud CLI for command-line management of the share and ACL
Instructions
Step 1 - Retrieve your File Storage Service share export path
If you have not yet created a share, follow the File Storage Service getting started guide to create an NFS share on your private network.
Once the share is in available status, retrieve its NFS export path. The path follows this format:
For example: 10.1.0.12:/shares/share-abc12345-def6-4abc-8def-123456abcdef
Split it into 2 components and note them for the following steps:
NFS_SERVER— the IP address part (e.g.10.1.0.12)NFS_PATH— the path part (e.g./shares/share-abc12345-def6-4abc-8def-123456abcdef)
Go to Storage & backup > File Storage, click your share, and find the Mount Path on the General information tab.
Step 2 - Grant Kubernetes node access to the share
The provisioner pod and every node that will mount NFS volumes must be allowed to reach the share. Add an ACL entry covering your cluster's private network subnet.
The File Storage Service is only accessible from OVHcloud IPs (Public Cloud instances, Managed Kubernetes Service). A single CIDR rule for your cluster subnet covers all nodes without listing individual IPs.
Click your share, go to the Access Control List (ACL) tab, then click Add a new access. Enter the CIDR range of your cluster's private network (e.g. 10.1.0.0/24) and select the Read and write permission.
Verify that the ACL entry is in active status before continuing.
Step 3 - Install the NFS Subdir External Provisioner
Add the Helm repository:
Install the provisioner, replacing <NFS_SERVER> and <NFS_PATH> with the values retrieved in Step 1:
archiveOnDelete=false permanently removes subdirectory data when the PVC is deleted. Set it to true to rename deleted PVC directories to archived-* instead, preserving the data at the cost of continued share consumption.
Verify the provisioner pod is running:
Step 4 - Inspect the StorageClass
The Helm chart creates a StorageClass automatically. Inspect it to confirm the configuration:
volumeBindingMode: Immediate means a PV is provisioned as soon as the PVC is created, regardless of whether any pod has claimed it yet.
Step 5 - Create PersistentVolumeClaims
Create a PVC using the nfs-subdir StorageClass:
Apply it:
The storage request is not enforced by the NFS Subdir External Provisioner — it is recorded as metadata only. All PVCs share the full capacity of the underlying File Storage Service share. Size your share according to your total expected usage across all PVCs.
Verify the PVC is bound:
Step 6 - Test with a shared workload
Deploy 2 Nginx replicas that mount the same PVC to verify ReadWriteMany access:
Write a file from the first pod and confirm it is visible from the second:
Both pods read and write the same subdirectory on the NFS share, confirming RWX access across nodes.
Limitations
- No capacity enforcement: The
storagefield in a PVC is metadata only. All PVCs from a given StorageClass share the total capacity of the underlying NFS share. - No volume snapshots: The provisioner does not support the
VolumeSnapshotAPI. Use Manila CSI if you need snapshot support. - No volume resize: PVCs cannot be resized after creation.
- No
ReadWriteOncequota isolation: For single-podReadWriteOnceuse cases with capacity enforcement, OVHcloud Block Storage (csi-cinder-high-speed) is more suitable. - Archived directories accumulate: With
archiveOnDelete=true, deleted PVC data is renamed but not removed. Capacity is consumed until you manually clean the archived directories.
Best practices
- One Helm release per environment: Deploy separate provisioner instances (e.g.
nfs-subdir-dev,nfs-subdir-prod) pointing to different shares or paths to avoid cross-environment data mixing. - Use
pathPatternfor readable directory names: SetstorageClass.pathPatternto${.PVC.namespace}/${.PVC.name}to generate human-readable subdirectory structures. See the NFS Subdir External Provisioner documentation for the full list of template variables. - Choose
archiveOnDeletedeliberately: Decide up front whether deleted PVC data should be preserved (true) or removed (false). Mixing policies after data exists on the share can cause confusion. - Monitor share capacity: Because per-PVC quotas are not enforced, monitor your File Storage Service share size in the OVHcloud Control Panel or via the OVHcloud API and resize it before it fills up.
- Match NFS mount options to File Storage Service capabilities: OVHcloud File Storage Service supports NFS v4. If you need to override mount options (e.g.
nfsvers=4,hard,timeo=600), set them viastorageClass.mountOptionsin the Helm values.
Go further
- File Storage Service — Getting started
- Persistent Volumes on OVHcloud Managed Kubernetes Service
- Configuring multi-attach persistent volumes with OVHcloud NAS-HA
- NFS Subdir External Provisioner on GitHub
For training or technical assistance implementing our solutions, contact your sales representative or visit our Professional Services page to request a quote and have your project analyzed by our experts.
Join our community of users.