How to Add Cluster Members When Expanding PD?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: pd扩容应该如何增加cluster member?

| username: Timber

[Test Environment] Testing environment
[TiDB Version] tikv6.1.0
Using an internal deployment tool to deploy tikv, the official documentation suggests using tiup and kubectl for easy scaling, but our own deployment tool can only add nodes and some parameters, such as initial-cluster, and cannot truly add new PD nodes to the existing PD cluster. So, I would like to ask if anyone knows how to add new PD nodes to the existing PD cluster. I tried using the join configuration, but it was unsuccessful. Checking the etcd members, there are still only the original nodes.

| username: kkpeter | Original post link

The --join parameter is used to join an existing cluster.

| username: xfworld | Original post link

It is recommended to use tiup for scaling operations.

Reference documentation:

| username: Timber | Original post link

I experimented a bit, and if you directly join, it will create a new cluster. The new cluster includes the joined nodes but does not join the original cluster of the target nodes.

| username: Timber | Original post link

Is there a way for tiup to connect to an existing cluster in the environment? The deployment was not done using tiup.

| username: xingzhenxiang | Original post link

Include the existing cluster nodes in the configuration file, then deploy using tiup, and you will be able to manage it.

| username: xfworld | Original post link

You can import through the tiup configuration file…

Then take over through tiup


Just find a new control machine to rebuild the environment

  1. Install the tiup toolkit
  2. Configure the information of the original cluster, topology.yaml (you need to enter the information of the original cluster nodes)
  3. tiup cluster deploy tidb-xxx ./topology.yaml
  4. tiup cluster display tidb-xxx

You can check the status of the cluster…

| username: redgame | Original post link

Add to the configuration file, add to tiup.

| username: Timber | Original post link

Thank you for the reply. Even though tiup managed the original cluster and expanded the PD, the newly added PD nodes are still not visible on the internal DevOps platform, which is not very user-friendly. I will try adding nodes and then use operations like pd join or etcd member add.

| username: Timber | Original post link

Finally, we deployed a new PD cluster and then added the TiKV nodes to the new PD cluster. The main reason is that our internal DevOps platform is not as smooth as TiUP and kubectl when expanding PD. In theory, our own DevOps could also achieve PD expansion, but the details of the expansion are unclear, making it difficult to adapt.

| username: kkpeter | Original post link

Are you sure you tested it correctly? Connect to PD and execute ‘member’ to check.