Enable cross-cluster search and cross-cluster replicationedit

Cross-cluster search (CCS) allows you to configure multiple remote clusters across different regions and providers, and enable federated search queries across all of the configured clusters.

Cross-cluster replication (CCR) allows you to replicate indices across multiple clusters regardless of where they’re located. This provides tremendous benefit in scenarios of disaster recovery or data locality.

These steps describe how to configure remote clusters. Once that’s done, you’ll be able to run CCS queries from Elasticsearch or set up CCR.

You no longer need to use the dedicated cross-cluster search template to search across clusters. You can now use any template to configure remote clusters and search across them when using stack version 6.7 or above. We’ve deprecated the cross-cluster search template. Existing deployments created using this template are not affected by this change, but they need to migrate to another template before upgrading to the next 8.0 major version.

Before you beginedit

To use CCS or CCR, your deployments must meet the following criteria:

  • Deployments must be version 6.7.x (to use CCS) or later and be compatible:

  • To use CCR, deployments must be at version 6.8.9 or higher (in the 6.x branch), or 7.7.1 or higher (in the 7.x branch).
  • Deployments must trust each other.

Configure remote clusters using Kibanaedit

You can configure remote clusters in Kibana starting with version 7.7.0:

  1. Open the Stack Management section and select Remote Clusters from the side navigation.

    Remote Clusters UI in Kibana
  2. To add a new remote cluster, fill in the following fields:

    • Name: this is the alias you will use to run CCS queries.
    • Proxy Address: This value can be found on the Security page of the deployment you want to use as a remote.
    • Server Name: This value can be found on the Security page of the deployment you want to use as a remote.
Remote Cluster Parameters in Deployment

Configure remote clusters using the Cloud RESTful APIedit

The following PUT request configures a remote cluster:

curl -H 'Content-Type: application/json' -X PUT -H "Authorization: ApiKey $EC_API_KEY" https://api.elastic-cloud.com/api/v1/deployments/$DEPLOYMENT_ID/elasticsearch/$REF_ID/remote-clusters -d '
  "resources" : [
      "deployment_id": "$DEPLOYMENT_ID_REMOTE",
      "elasticsearch_ref_id": "$REF_ID_REMOTE",
      "alias": "alias-your-remote",
      "skip_unavailable" : true
The ID of your remote deployment, as shown in the Cloud UI or obtained through the API.
The unique ID of the Elasticsearch resources inside your remote deployment (you can obtain these values through the API).

Note the following when using the API:

  1. A cluster alias must contain only letters, numbers, dashes (-), or underscores (_).
  2. To learn about skipping disconnected clusters, refer to the Elasticsearch documentation.
  3. When remote clusters are already configured for a deployment, the PUT request replaces the existing configuration with the new configuration passed. Passing an empty array of resources will remove all remote clusters.

The following API request retrieves the remote clusters configuration:

curl -X GET -H "Authorization: ApiKey $EC_API_KEY" https://api.elastic-cloud.com/api/v1/deployments/$DEPLOYMENT_ID/elasticsearch/$REF_ID/remote-clusters

Enable CCR and the Remote Clusters UI in Kibanaedit

If your deployment was created before February 2021, CCR won’t be enabled and you won’t find the Remote Clusters UI in Kibana even though your deployment meets all the criteria.

To enable these features, go to the Security page of your deployment and under Trust management select Enable CCR.

CCR is not supported for indices used by Enterprise Search.

Remote Clusters and Traffic Filteringedit

Traffic filtering can be enabled to restrict access to deployments that are used as a local or remote cluster without any impact to cross-cluster search or cross-cluster replication.