Connect to and manage a shared Ceph cluster

TechPreview Available since 2.22.0


For MOSK-based deployments, the feature is not supported yet.

A shared Ceph cluster allows connecting of a consumer cluster to a producer cluster. The consumer cluster uses the Ceph cluster deployed on the producer to store the necessary data. In other words, the producer cluster contains the Ceph cluster with mon, mgr, osd, and mds daemons. And the consumer cluster contains clients that require access to the Ceph storage.

For example, an NGINX application that runs in a cluster without storage requires a persistent volume to store data. In this case, such a cluster can connect to a Ceph cluster and use it as a block or file storage.


  • Connection to a shared Ceph cluster is possible only through the client.admin user.

  • The producer and consumer clusters must be located in the same region and management cluster.

  • The LCM network of the producer cluster must be available in the consumer cluster.

Connect the producer to the consumer

  1. Enable the ceph-controller Helm release in the consumer managed cluster:

    1. Open the Cluster object for editing:

      kubectl -n <consumerClusterProjectName> edit cluster <consumerClusterName>
    2. In the spec section, add the ceph-controller Helm release:

            - name: ceph-controller
              values: {}
  2. Obtain namespace/name of the consumer managed cluster:

    kubectl -n <consumerClusterProjectName> get cluster -o jsonpath='{range .items[*]}{@.metadata.namespace}{"/"}{}{"\n"}{end}'

    Example output:

  3. Connect to the producer cluster and generate connectionString in the ceph-controller Pod:

    kubectl -n ceph-lcm-mirantis exec -it $(kubectl -n ceph-lcm-mirantis get pod -l "app=ceph-controller" -o name | head -1) -c ceph-controller -- ceph-cluster-connector --cluster-id <clusterNamespacedName>

    Substitute <clusterNamespacedName> with the corresponding value from the previous step.

    Example of a positive system response:

    I1221 14:20:29.921024     139 main.go:17] Connector code version: 1.0.0-mcc-dev-ebcd6677
    I1221 14:20:29.921085     139 main.go:18] Go Version: go1.18.8
    I1221 14:20:29.921097     139 main.go:19] Go OS/Arch: linux/amd64
    I1221 14:20:30.801832     139 connector.go:71] Your connection string is:
  4. Create the consumer KaaSCephCluster object file, for example, consumer-kcc.yaml with the following content:

    kind: KaaSCephCluster
      name: <consumerClusterProjectName>
      namespace: <clusterName>
          enable: true
          connectionString: <generatedConnectionString>
          clusterNet: <clusterNetCIDR>
          publicNet: <publicNetCIDR>
        nodes: {}
        name: <clusterName>
        namespace: <consumerClusterProjectName>

    Specify the following values:

    • <consumerClusterProjectName> is the project name of the consumer managed cluster on the management cluster.

    • <clusterName> is the consumer managed cluster name.

    • <generatedConnectionString> is the connection string generated in the previous step.

    • <clusterNetCIDR> and <publicNetCIDR> are values that must match the same values in the producer KaaSCephCluster object.


    The and spec.cephClusterSpec.nodes parameters are mandatory.

    The connectionString parameter is specified in the spec.cephClusterSpec.external section of the KaaSCephCluster CR. The parameter contains an encrypted string with all the configurations needed to connect the consumer cluster to the shared Ceph cluster.

  5. Apply consumer-kcc.yaml on the management cluster:

    kubectl apply -f consumer-kcc.yaml

Once the Ceph cluster is specified in the KaaSCephCluster CR of the consumer cluster, Ceph Controller validates it and requests Rook to connect the consumer and producer.

Consume pools from the Ceph cluster

  1. Open the KaasCephCluster CR of the consumer cluster for editing:

    kubectl -n <managedClusterProjectName> edit kaascephcluster

    Substitute <managedClusterProjectName> with the corresponding value.

  2. In the spec.cephClusterSpec.pools, specify pools from the producer cluster to be used by the consumer cluster. For example:


    Each name in the pools section must match the corresponding full pool name of the producer cluster. You can find full pool names in the KaaSCephCluster CR by the following path: status.fullClusterInfo.blockStorageStatus.poolsStatus.

        - default: true
          deviceClass: ssd
          useAsFullName: true
          name: kubernetes-ssd
          role: kubernetes-ssd
        - default: false
          deviceClass: hdd
          useAsFullName: true
          name: volumes-hdd
          role: volumes

After specifying pools in the consumer KaaSCephCluster CR, Ceph Controller creates a corresponding StorageClass for each specified pool, which can be used for creating ReadWriteOnce persistent volumes (PVs) in the consumer cluster.

Enable CephFS on a consumer Ceph cluster

In the sharedFilesystem section of the consumer cluster, specify the dataPools to share.


Sharing CephFS also requires specifying the metadataPool and metadataServer sections similarly to the corresponding sections of the producer cluster. For details, see CephFS specification.

For example:

      - name: cephfs-store
        - name: cephfs-pool-1
            size: 3
          failureDomain: host
            size: 3
          failureDomain: host
          activeCount: 1
          activeStandby: false

After specifying CephFS in the KaaSCephCluster CR of the consumer cluster, Ceph Controller creates a corresponding StorageClass that allows creating ReadWriteMany (RWX) PVs in the consumer cluster.