It is time to say goodbye: This version of Elastic Cloud Enterprise has reached end-of-life (EOL) and is no longer supported.
The documentation for this version is no longer being maintained. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
Enable cross-cluster search
editEnable cross-cluster search
editCross-cluster search (CCS) allows you to configure multiple remote deployments, and enable federated search queries across all of the configured deployments.
Cluster settings are automatically maintained and updated when cluster topologies change. For example, all connected clusters are updated when:
- A cluster is deleted
- A node is added or removed from a cluster
Once your remotes are configured, you can run CCS queries from Elasticsearch.
Before you begin
editTo enable CCS, you must meet the following criteria:
- All clusters must be in the same same Elastic Cloud Enterprise environment.
-
All deployments must be version 6.1.x or later.
- Review the Elasticsearch version compatibility table.
- System deployments are not compatible with CCS.
- To access the RESTful API for Elastic Cloud Enterprise, you must use your Elastic Cloud Enterprise credentials.
Establish remote deployment relationships
editThe CCS deployment acts as a hub that manages all of the remote deployment connections.
- Log into the Cloud UI.
- Click Create deployment.
- Select the Cross Cluster Search template.
-
Decide when to add the remote connections:
- If you know the deployments that you want to include, click Customize deployment to define the remotes while creating the deployment.
- After the deployment is spun up, you can add remotes from the deployment overview page.
- Click Add deployment.
-
Select a target deployment from the Deployment name drop-down list.
Only the compatible deployments appear on this list.
- Optional: Update the generated alias to something meaningful to you.
- Save your changes.
- Verify the configuration by running CCS queries from Elasticsearch.
- As needed, from the Elasticsearch API or Kibana, update the Elasticsearch cluster security and user access roles to allow them to access the remote deployments.
The target deployment overview page shows which CCS deployments can search the target.
Enable CCS through the API
editTo enable cross-cluster search on your cluster through the RESTful API:
curl -k -H 'Content-Type: application/json' -X PUT -u USER:PASSWORD https://COORDINATOR_HOST:12443/api/v1/clusters/elasticsearch/ELASTICSEARCH_CLUSTER_ID/ccs/settings -d ' { "remote_clusters": { "alias1": { "cluster_id": "fbbc90c8540843adaa4304b4a5cf9eba", "skip_unavailable": true }, "alias2": { "cluster_id": "4e8c2d90e94b4a1a9a9b2c83145a8df1", "skip_unavailable": false } } }'
-
ELASTICSEARCH_CLUSTER_ID
- The Elasticsearch cluster ID as shown in the Cloud UI or obtained via the API
Cluster aliases must contain only letters, numbers, dashes (-), or underscores (_)
To learn about skipping disconnected clusters, refer to the Elasticsearch documentation.
When cross-cluster search is already configured on a cluster, the PUT
request replaces the existing configuration with the new settings.
Other cross-cluster search settings exposed by Elasticsearch are managed by Elastic Cloud Enterprise. Do not change these settings.
Retrieve cross-cluster search configurations:
curl -k -X GET -u $USER:$PASSWORD https://$COORDINATOR_HOST:12443/api/v1/clusters/elasticsearch/$ELASTICSEARCH_CLUSTER_ID/ccs/settings