Documentation/CRDs/Cluster/external-cluster/consumer-import.md
Install Rook in the the consumer cluster, either with Helm or the manifests.
To install with Helm, the rook cluster helm chart will configure the necessary resources for the external cluster with the example values-external.yaml.
clusterNamespace=rook-ceph
operatorNamespace=rook-ceph
cd deploy/examples/charts/rook-ceph-cluster
helm repo add rook-release https://charts.rook.io/release
helm install --create-namespace --namespace $clusterNamespace rook-ceph rook-release/rook-ceph -f values.yaml
helm install --create-namespace --namespace $clusterNamespace rook-ceph-cluster \
--set operatorNamespace=$operatorNamespace rook-release/rook-ceph-cluster -f values-external.yaml
If not installing with Helm, here are the steps to install with manifests.
Deploy Rook, create common.yaml, crds.yaml, csi-operator.yaml and operator.yaml manifests.
Create common-external.yaml and cluster-external.yaml
Paste the above output from create-external-cluster-resources.py into your current shell to allow importing the provider data.
The import script in the next step uses the current kubeconfig context by default. If you want to specify the kubernetes cluster to use without changing the current context, you can specify the cluster name by setting the KUBECONTEXT environment variable.
export KUBECONTEXT=<cluster-name>
Here is the link for import script. The script has used the rook-ceph namespace and few parameters that also have referenced from namespace variable. If user's external cluster has a different namespace, change the namespace parameter in the script according to their external cluster. For example with new-namespace namespace, this change is needed on the namespace parameter in the script.
NAMESPACE=${NAMESPACE:="new-namespace"}
Run the import script.
!!! note
If your Rook cluster nodes are running a kernel earlier than or equivalent to 5.4, remove
fast-diff, object-map, deep-flatten,exclusive-lock from the imageFeatures line.
. import-external-cluster.sh
Verify the consumer cluster is connected to the provider ceph cluster:
$ kubectl -n rook-ceph get CephCluster
NAME DATADIRHOSTPATH MONCOUNT AGE STATE HEALTH
rook-ceph-external /var/lib/rook 162m Connected HEALTH_OK
Verify the creation of the storage class depending on the rbd pools and filesystem provided.
ceph-rbd and cephfs would be the respective names for the RBD and CephFS storage classes.
kubectl -n rook-ceph get sc
Create a persistent volume based on these StorageClass.