From 4ad8160ab3cf349fa1614bf43fdadbe95dfde2b3 Mon Sep 17 00:00:00 2001 From: Ran Date: Sun, 27 Sep 2020 11:42:21 +0800 Subject: [PATCH] en, zh: add a step for removing Pump nodes (#737) * en: update doc for removing Pump nodes Signed-off-by: Ran * zh: update format Signed-off-by: Ran * 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> --- en/deploy-tidb-binlog.md | 12 ++++++++---- zh/deploy-tidb-binlog.md | 10 +++++----- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/en/deploy-tidb-binlog.md b/en/deploy-tidb-binlog.md index f3cad6b177..fb6fd3657b 100644 --- a/en/deploy-tidb-binlog.md +++ b/en/deploy-tidb-binlog.md @@ -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 diff --git a/zh/deploy-tidb-binlog.md b/zh/deploy-tidb-binlog.md index 1f5d3d1ae7..9499edee55 100644 --- a/zh/deploy-tidb-binlog.md +++ b/zh/deploy-tidb-binlog.md @@ -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 节点