Enable ReadWriteMany volume¶
Preambule¶
A ReadWriteMany volume, often written rwx is volume that can be mounted as read-wirte by many nodes. For more information, https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes.
OVH Cloud Provider enabled this feature in April 2026. The following How-to is based on the documentation provided by OVH here : https://help.ovhcloud.com/csm/en-public-cloud-storage-file-storage-service-getting-started?id=kb_article_view&sysparm_article=KB0072892.
Several methods are available for enabling this, but we have chosen ‘Via Manila CSI in a Kubernetes environment’, as this is the one that best meets our needs: a Kubernetes volume that can be created dynamically without manual intervention from an administrator.
It has been automated in pull request RS-PYTHON/rs-infra-core#312 and RS-PYTHON/rs-workflow-env#92 when you install Kubernetes cluster from scratch.
However, you can enabled it if you already run a kubernetes cluster and don't want to redeploy everything.
Instructions¶
Installation OpenStack CLI¶
Install the Manila client to manage File Storage shares on the bastion:
Preparing OpenStack resources for Manila CSI¶
Create a dedicated OpenStack user for Manila¶
You need a separate OpenStack user to manage Manila resources. This user can be created:
- Through the OVHcloud Control Panel (Public Cloud > Settings > Users & Roles)
- Or via the OVHcloud CLI
The roles needed are :
- share operator
- network operator
The first to be able to ‘share’ the target network and ‘network operator’ to be able to display the desired network.
Collect OpenStack project and user details¶
Download your project’s openrc file from the OVHcloud Control Panel, matching the same region as your Kubernetes cluster, and note the following credentials:
- os-userName (value of OS_USERNAME)
- os-password
- os-domainName (=default)
- os-projectDomainID (=default)
- os-projectName (value of OS_TENANT_NAME)
Configure the OpenStack shared network¶
Manila requires a share network because the driver is configured with DHSS=true (driver_handles_share_servers).
This resource is managed by the owner of the OpenStack project.
Note: the following command are in GRA11, adapt to your region.
# List private networks attached to your MKS cluster
openstack --os-region-name <REGION> network list
Example output:
+--------------------------------------+-----------------------+-----------------------------------------------------------------------------+
| ID | Name | Subnets |
+--------------------------------------+-----------------------+-----------------------------------------------------------------------------+
| a1c5d9e7-2f14-4b3a-98d2-6cbb9f4a7e12 | private-net-cluster-1 | 5e2a71c9-0d3f-4c77-a62e-9b14d7f028ab |
| 9b7f2d44-5cfa-41d0-8e1c-3a6d88b7c3e1 | Ext-Net-Baremetal | f2d9c8a3-7b4c-4631-82a0-1f5e3b7d9a42, 8a71d0f6-99b4-4e6a-b82e-4c3f7a1b5d09 |
| e3b8a921-6d4c-45ff-b7a3-b0c2d8e6f913 | private-net-cluster-3 | 6f91b3c7-2e88-48e5-9c31-a7d9e4f2b6c0 |
| 4d2f7c88-11a5-43d9-a9f3-5d8b6c7e2a4f | Ext-Net | 2c9b5a73-3f90-4f24-8e31-9c7d52a6b4fa, 1a74e9c2-5d2f-4b68-98e3-4b8c9d1f2e6a, |
| | | c0d5e7f8-9a1b-4d92-a7c3-3d6b8e1f5a2c, e9f0a1b2-3c4d-47fa-b8a3-6e2d1c9f4b55 |
| 7c9a2e11-88d4-4c0f-b3e8-2f6a5d9c1b77 | private-net-cluster-1 | b3a9c5d7-4e21-47f8-9b63-7a8c2d5e1f90 |
+--------------------------------------+-----------------------+-----------------------------------------------------------------------------+
Retrieve the private network ID and the private subnet ID¶
Example output:
+---------+--------------------------------------+
| Field | Value |
+---------+--------------------------------------+
| id | 7c9a2e11-88d4-4c0f-b3e8-2f6a5d9c1b77 |
| subnets | b3a9c5d7-4e21-47f8-9b63-7a8c2d5e1f90 |
+---------+--------------------------------------+
Create the Manila share network¶
openstack --os-region-name <REGION> share network create \
--name mks-manila-csi-ops \
--neutron-net-id <PRIVATE_NETWORK_ID> \
--neutron-subnet-id <PRIVATE_SUBNET_ID>
Example output:
+-----------------------------------+----------------------------------------------------------+
| Field | Value |
+-----------------------------------+----------------------------------------------------------+
| created_at | 2025-10-04T14:12:25.111776 |
| description | None |
| id | 07363bc7-be2a-4a7d-b675-09844b344b3b |
| name | mks-manila-csi-ops |
| network_allocation_update_support | True |
| project_id | <PROJECT_ID> |
| security_service_update_support | True |
| share_network_subnets | |
| | id = 90cf66fc-23eb-4dce-80a3-bf8fa3a912c3 |
| | availability_zone = None |
| | created_at = 2025-10-04T14:12:25.126327 |
| | updated_at = None |
| | segmentation_id = None |
| | neutron_net_id = 7c9a2e11-88d4-4c0f-b3e8-2f6a5d9c1b77 |
| | neutron_subnet_id = b3a9c5d7-4e21-47f8-9b63-7a8c2d5e1f90 |
| | ip_version = None |
| | cidr = None |
| | network_type = None |
| | mtu = None |
| | gateway = None |
| status | active |
| updated_at | None |
+-----------------------------------+----------------------------------------------------------+
Update the inventory¶
Option 1 (recommended) : Put this directly in your generated inventory file (inventory/mycluster/group_vars/all/generated_inventory_vars.yaml) :
sharenetwork:
manila_username: "<manila_username>"
manila_password: "<manila_password>"
sharenetwork_id: "<sharenetwork_id>"
osprojectname: "<osprojectname>"
And replace with the correct values.
Option 2 : or create a new file in {{ inventory_dir }}/host_vars/setup/sharenetwork.yaml with the same content.
And regenerate the inventory file. Be careful, the auto generated values will be replaced with new ones, and this will severly mess up your inventory with wrong password everywhere.
Deploy the apps¶
00-storage-class¶
To deploy the new storage class (sc-manila-nfs.yaml).
ansible-playbook apps.yaml \
-i inventory/mycluster/hosts.yaml \
-e app="storage-class"
-e private_registry=true ;
01-csi-driver-nfs¶
ansible-playbook apps.yaml \
-i inventory/mycluster/hosts.yaml \
-e app="csi-driver-nfs"
-e private_registry=true ;
01-openstack-manila-csi¶
ansible-playbook apps.yaml \
-i inventory/mycluster/hosts.yaml \
-e app="openstack-manila-csi"
-e private_registry=true ;
Create a shared volume¶
Take as example this file RS-PYTHON/rs-workflow-env/apps/dask-gateway/sharedvolume.yaml.
The creation is a bit slow, it can take several minutes.