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 cluster should be in one region.

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

Connect the producer to the consumer

  1. From the producer KaaSCephCluster custom resource (CR), obtain the consumer cluster name:

    kubectl -n <managedClusterProjectName> get kaascephcluster -o jsonpath='{.items[0].spec.k8sCluster.namespace}/{.items[0]}{"\n"}'

    Substitute <managedClusterProjectName> with the corresponding value.

  2. 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 <clusterName>

    Substitute <clusterName> 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:
  3. Open the KaasCephCluster CR of the consumer cluster:

    kubectl -n <managedClusterProjectName> edit kaascephcluster

    Substitute <managedClusterProjectName> with the corresponding value.

  4. In the external section, specify the following parameters:


    • spec.cephClusterSpec.nodes

    • connectionString


    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.

          enable: true
          connectionString: <generatedConnectionString>
          clusterNet: <CIDR>
          publicNet: <CIDR>
        nodes: {}

    Substitute <generatedConnectionString> with the generated string from the producer cluster and substitute <CIDR> with networks of the Ceph cluster.

  5. Save the KaaSCephCluster CR and close the editor.

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:

    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
  3. Save the KaaSCephCluster CR and close the editor.

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

  1. Applies before Container Cloud 2.22.0. Enable the CephFS feature on the consumer cluster using the steps 1-3 of the Enable CephFS.


    Since Container Cloud 2.22.0, CephFS is enabled by default.

  2. 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.