Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tidb-in-kubernetes: update offline pump doc #1940

Merged
12 changes: 5 additions & 7 deletions dev/tidb-in-kubernetes/maintain/backup-and-restore.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,31 +128,29 @@ kubectl get pvc -n <namespace> -l app.kubernetes.io/component=backup,pingcap.com

### Pump 缩容

缩容 Pump 需要挨个先将 Pump 节点从集群中下线之后操作 `helm upgrade` 进行缩容
缩容 Pump 需要先将单个 Pump 节点从集群中下线,然后运行 `helm upgrade` 命令将对应的 Pump Pod 删除,并对每个节点重复上述步骤

1. 下线 Pump 节点:

假设现在有 3 个 Pump 节点,我们需要下线第 3 个 Pump 节点,将 `<ordinal-id>` 替换成 `2`,操作方式是:
假设现在有 3 个 Pump 节点,我们需要下线第 3 个 Pump 节点,将 `<ordinal-id>` 替换成 `2`,操作方式如下(`<version>` 为当前 TiDB 的版本)。

{{< copyable "shell-regular" >}}

```shell
kubectl run offline-pump-<ordinal-id> --image=pingcap/tidb-binlog:<version> --namespace=<namespace> --restart=OnFailure -- /binlogctl -pd-urls=http://<release-name>-pd:2379 -cmd offline-pump -node-id <release-name>-pump-<ordinal-id>:8250
```

`<version>` 为当前 TiDB 的版本。

然后查看 Pump 的日志输出,确认输出 `pump offline, please delete my pod` 后即可确认该节点已经成功下线。
然后查看 Pump 的日志输出,输出 `pump offline, please delete my pod` 后即可确认该节点已经成功下线。

{{< copyable "shell-regular" >}}

```shell
kubectl logs -f -n <namespace> <release-name>-pump-<ordinal-id>
```

2. 缩容 Pump:
2. 删除对应的 Pump Pod

修改 `values.yaml` 文件中 `binlog.pump.replicas` 为 `2`,然后执行缩容操作
修改 `values.yaml` 文件中 `binlog.pump.replicas` 为 `2`,然后执行如下命令来删除 Pump Pod

{{< copyable "shell-regular" >}}

Expand Down
12 changes: 5 additions & 7 deletions v3.0/tidb-in-kubernetes/maintain/backup-and-restore.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,31 +129,29 @@ kubectl get pvc -n <namespace> -l app.kubernetes.io/component=backup,pingcap.com

### Pump 缩容

缩容 Pump 需要挨个先将 Pump 节点从集群中下线之后操作 `helm upgrade` 进行缩容
缩容 Pump 需要先将单个 Pump 节点从集群中下线,然后运行 `helm upgrade` 命令将对应的 Pump Pod 删除,并对每个节点重复上述步骤

1. 下线 Pump 节点:

假设现在有 3 个 Pump 节点,我们需要下线第 3 个 Pump 节点,将 `<ordinal-id>` 替换成 `2`,操作方式是:
假设现在有 3 个 Pump 节点,我们需要下线第 3 个 Pump 节点,将 `<ordinal-id>` 替换成 `2`,操作方式如下(`<version>` 为当前 TiDB 的版本)。

{{< copyable "shell-regular" >}}

```shell
kubectl run offline-pump-<ordinal-id> --image=pingcap/tidb-binlog:<version> --namespace=<namespace> --restart=OnFailure -- /binlogctl -pd-urls=http://<release-name>-pd:2379 -cmd offline-pump -node-id <release-name>-pump-<ordinal-id>:8250
```

`<version>` 为当前 TiDB 的版本。

然后查看 Pump 的日志输出,确认输出 `pump offline, please delete my pod` 后即可确认该节点已经成功下线。
然后查看 Pump 的日志输出,输出 `pump offline, please delete my pod` 后即可确认该节点已经成功下线。

{{< copyable "shell-regular" >}}

```shell
kubectl logs -f -n <namespace> <release-name>-pump-<ordinal-id>
```

2. 缩容 Pump:
2. 删除对应的 Pump Pod

修改 `values.yaml` 文件中 `binlog.pump.replicas` 为 `2`,然后执行缩容操作
修改 `values.yaml` 文件中 `binlog.pump.replicas` 为 `2`,然后执行如下命令来删除 Pump Pod

{{< copyable "shell-regular" >}}

Expand Down