From 9be33bca53d956d7fa8b3867eeea1b74334ee46a Mon Sep 17 00:00:00 2001 From: parth-gr Date: Tue, 5 Mar 2024 19:17:49 +0530 Subject: [PATCH] doc: add design to support nfs in external cluster with recent discussion we come to conclusion nfs can be suported easily in the external cluster so adding the design that we discussed closes: https://github.com/rook/rook/issues/13277 Signed-off-by: parth-gr --- .../Cluster/external-cluster/external-cluster.md | 4 ++++ .../Storage-Configuration/NFS/nfs-csi-driver.md | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/Documentation/CRDs/Cluster/external-cluster/external-cluster.md b/Documentation/CRDs/Cluster/external-cluster/external-cluster.md index bc0db2bb0..044556342 100644 --- a/Documentation/CRDs/Cluster/external-cluster/external-cluster.md +++ b/Documentation/CRDs/Cluster/external-cluster/external-cluster.md @@ -253,6 +253,10 @@ Consume the S3 Storage, in two different ways: If encryption or compression on the wire is needed, specify the `--v2-port-enable` flag. If the v2 address type is present in the `ceph quorum_status`, then the output of 'ceph mon data' i.e, `ROOK_EXTERNAL_CEPH_MON_DATA` will use the v2 port(`3300`). +### NFS storage + +Rook suggests a different mechanism for making use of an [NFS service running on the external Ceph standalone cluster](../../../Storage-Configuration/NFS/nfs-csi-driver.md#consuming-nfs-from-an-external-source), if desired. + ## Exporting Rook to another cluster If you have multiple K8s clusters running, and want to use the local `rook-ceph` cluster as the central storage, diff --git a/Documentation/Storage-Configuration/NFS/nfs-csi-driver.md b/Documentation/Storage-Configuration/NFS/nfs-csi-driver.md index 22b2b21f9..4b2ec0ec3 100644 --- a/Documentation/Storage-Configuration/NFS/nfs-csi-driver.md +++ b/Documentation/Storage-Configuration/NFS/nfs-csi-driver.md @@ -207,3 +207,16 @@ To clean your cluster of the resources created by this example, run the followin ```console kubectl delete -f deploy/examples/csi/nfs/pvc-clone.yaml ``` + +## Consuming NFS from an external source + +For consuming NFS services and exports external to the Kubernetes cluster (including those backed by an external standalone Ceph cluster), Rook recommends using Kubernetes regular NFS consumption model. This requires the Ceph admin to create the needed export, while reducing the privileges needed in the client cluster for the NFS volume. + +Export and get the nfs client to a particular cephFS filesystem: + +```yaml +ceph nfs export create cephfs /test +ceph nfs export get +``` + +Create the [PV and PVC](https://github.com/kubernetes/examples/tree/master/staging/volumes/nfs) using `nfs-client-server-ip`. It will mount NFS volumes with PersistentVolumes and then mount the PVCs in the [user Pod Application](https://kubernetes.io/docs/concepts/storage/volumes/#nfs) to utilize the NFS type storage.