# Can ECK be configured to allow all nodes to join an existing cluster?

**URL:** <https://discuss.elastic.co/t/can-eck-be-configured-to-allow-all-nodes-to-join-an-existing-cluster/354397>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Created:** [February 29, 2024, 3:40am UTC](https://discuss.elastic.co/t/can-eck-be-configured-to-allow-all-nodes-to-join-an-existing-cluster/354397 "2024-02-29T03:40:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wangxr1985](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wangxr1985/32/117798_2.png) [@wangxr1985](https://discuss.elastic.co/u/wangxr1985)\
**Post date:** [February 29, 2024, 3:40am UTC](https://discuss.elastic.co/t/can-eck-be-configured-to-allow-all-nodes-to-join-an-existing-cluster/354397/1 "2024-02-29T03:40:31Z")

</div>

Our k8s network is connected to other physical and virtual machine networks through the BGP protocol, allowing direct communication between them. Can ECK be configured to allow all nodes to join another cluster? So that the cluster on physical machines can be temporarily expanded.

I also hope to smoothly migrate the physical cluster to ECK using a similar method, where nodes with the same number and roles are created in ECK and added to the existing physical cluster. Once the data has been migrated to the nodes in ECK, the nodes in the physical cluster can be taken offline. Is this possible now?

I have tried configuring only data nodes, but it throws an error saying "Required value: Elasticsearch needs to have at least one master node."

---

<div class="post-metadata">

**Author:** ![Thibault\_Richard](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thibault_richard/32/50513_2.png) [@Thibault\_Richard](https://discuss.elastic.co/u/Thibault_Richard)\
**Post date:** [February 29, 2024, 5:19pm UTC](https://discuss.elastic.co/t/can-eck-be-configured-to-allow-all-nodes-to-join-an-existing-cluster/354397/2 "2024-02-29T17:19:07Z")

</div>

Hello,

ECK does not natively support this scenario today.

Theoretically you could achieve this by pausing Elasticsearch nodes (see [Troubleshooting methods | Elastic Cloud on Kubernetes [2.11] | Elastic](https://www.elastic.co/guide/en/cloud-on-k8s/2.11/k8s-troubleshooting-methods.html#k8s-suspend-elasticsearch)) and running the [node-tool](https://www.elastic.co/guide/en/elasticsearch/reference/current/node-tool.html) but it seems dangerous to me to go that route.

Since snapshots are taken incrementally, you can also perform a sort of live migration by following this process:

- t0 create cluster B
- t1 snapshot cluster A data
- t2 restore cluster A data to cluster B
- t3 switch your trafic clients to use cluster B
- t4 snapshot again cluster A to get the missing docs indexed between t1 and t3
- t5 restore latest snapshot to cluster B

Another alternative is to reindex using remote cluster (see [Migrate from a self-managed cluster with a self-signed certificate using remote reindex | Elasticsearch Service Documentation | Elastic](https://www.elastic.co/guide/en/cloud/current/ec-remote-reindex.html)).

Hope this helps.

---

<div class="post-metadata">

**Author:** ![wangxr1985](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wangxr1985/32/117798_2.png) [@wangxr1985](https://discuss.elastic.co/u/wangxr1985)\
**Post date:** [March 6, 2024, 8:49am UTC](https://discuss.elastic.co/t/can-eck-be-configured-to-allow-all-nodes-to-join-an-existing-cluster/354397/3 "2024-03-06T08:49:58Z")

</div>

Thank you very much. I tried the following method to achieve cross-cluster scaling and migration, although it is not a secure practice:

1. Generate a shared certificate file and create a separate secret for tls.crt, tls.key, and ca.crt. All k8s ES instances use this certificate.
2. Create an ES instance named test-1. Configure "cluster.name: test" in "spec.nodesSets.config", mount the certificate from the secret, and specify the use of these certificate files in the configuration.
3. Find the master pod IP in test-1, create an ES instance named test-2, and configure discovery.seed\_hosts: ["list of master pod IPs in test-1"] in the config.
4. Call api "\_cluster/settings" and set "persistent.cluster.routing.allocation.exclude.\_name" to "test-1-es-data-0, test-1-es-data-1".
5. Set "kubectl annotate es test-1 [eck.k8s.elastic.co/suspend=all\_pods\_in\_test-1](http://eck.k8s.elastic.co/suspend=all_pods_in_test-1)" to stop all test-1 pods.
6. Remove the discovery.seed\_hosts configuration from test-2.yaml and apply kubectl -f test-2.yaml.
7. Delete test-1.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 3, 2024, 8:50am UTC](https://discuss.elastic.co/t/can-eck-be-configured-to-allow-all-nodes-to-join-an-existing-cluster/354397/4 "2024-04-03T08:50:40Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
