Skip to content

Commit

Permalink
en, zh: add a step for removing Pump nodes (#737)
Browse files Browse the repository at this point in the history
* en: update doc for removing Pump nodes

Signed-off-by: Ran <huangran@pingcap.com>

* zh: update format

Signed-off-by: Ran <huangran@pingcap.com>

* Apply suggestions from code review

Co-authored-by: DanielZhangQD <36026334+DanielZhangQD@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com>

Co-authored-by: DanielZhangQD <36026334+DanielZhangQD@users.noreply.github.com>
Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com>
  • Loading branch information
3 people authored Sep 27, 2020
1 parent 60f026d commit 4ad8160
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
12 changes: 8 additions & 4 deletions en/deploy-tidb-binlog.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,13 +377,17 @@ The steps are as follows:

### Remove Pump nodes completely

1. Refer to [Scale in Pump](#scale-in-pump) to scale in Pump to `0`.
1. Before removing Pump nodes, execute `kubectl edit tc ${cluster_name} -n ${namespace}` and set `spec.tidb.binlogEnabled` to `false`. After the TiDB Pods are rolling updated, you can remove the Pump nodes.

2. Execute `kubectl edit tc ${cluster_name} -n ${namespace}` and delete all configuration items of `spec.pump`.
If you directly remove Pump nodes, it might cause TiDB failure because TiDB has no Pump nodes to write into.

3. Execute `kubectl delete sts ${cluster_name}-pump -n ${namespace}` to delete the StatefulSet resources of Pump.
2. Refer to [Scale in Pump](#scale-in-pump) to scale in Pump to `0`.

4. View PVCs used by the Pump cluster by executing `kubectl get pvc -n ${namespace} -l app.kubernetes.io/component=pump`. Then delete all the PVC resources of Pump by executing `kubectl delete pvc -l app.kubernetes.io/component=pump -n ${namespace}`.
3. Execute `kubectl edit tc ${cluster_name} -n ${namespace}` and delete all configuration items of `spec.pump`.

4. Execute `kubectl delete sts ${cluster_name}-pump -n ${namespace}` to delete the StatefulSet resources of Pump.

5. View PVCs used by the Pump cluster by executing `kubectl get pvc -n ${namespace} -l app.kubernetes.io/component=pump`. Then delete all the PVC resources of Pump by executing `kubectl delete pvc -l app.kubernetes.io/component=pump -n ${namespace}`.

### Remove Drainer nodes

Expand Down
10 changes: 5 additions & 5 deletions zh/deploy-tidb-binlog.md
Original file line number Diff line number Diff line change
Expand Up @@ -367,11 +367,11 @@ spec:

### 完全移除 Pump 节点

* 移除 Pump 节点前,必须首先需要执行 `kubectl edit tc ${cluster_name} -n ${namespace}` **设置**其中的 `spec.tidb.binlogEnabled` 为 `false`,等待 TiDB Pod 完成重启更新后再移除 Pump 节点。如果直接移除 Pump 节点会导致 TiDB 没有可以写入的 Pump 而无法使用。
* 参考 [缩容 Pump 节点步骤](#缩容-pump-节点) 缩容 Pump 到 0。
* `kubectl edit tc ${cluster_name} -n ${namespace}` 将 `spec.pump` 部分配置项全部删除。
* `kubectl delete sts ${cluster_name}-pump -n ${namespace}` 删除 Pump StatefulSet 资源。
* 通过 `kubectl get pvc -n ${namespace} -l app.kubernetes.io/component=pump` 查看 Pump 集群使用过的 PVC,随后使用 `kubectl delete pvc -l app.kubernetes.io/component=pump -n ${namespace}` 指令删除 Pump 的所有 PVC 资源。
1. 移除 Pump 节点前,必须首先需要执行 `kubectl edit tc ${cluster_name} -n ${namespace}` 设置其中的 `spec.tidb.binlogEnabled` 为 `false`,等待 TiDB Pod 完成重启更新后再移除 Pump 节点。如果直接移除 Pump 节点会导致 TiDB 没有可以写入的 Pump 而无法使用。
2. 参考[缩容 Pump 节点步骤](#缩容-pump-节点)缩容 Pump 到 0。
3. `kubectl edit tc ${cluster_name} -n ${namespace}` 将 `spec.pump` 部分配置项全部删除。
4. `kubectl delete sts ${cluster_name}-pump -n ${namespace}` 删除 Pump StatefulSet 资源。
5. 通过 `kubectl get pvc -n ${namespace} -l app.kubernetes.io/component=pump` 查看 Pump 集群使用过的 PVC,随后使用 `kubectl delete pvc -l app.kubernetes.io/component=pump -n ${namespace}` 指令删除 Pump 的所有 PVC 资源。

### 移除 Drainer 节点

Expand Down

0 comments on commit 4ad8160

Please sign in to comment.