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
7 changes: 0 additions & 7 deletions crowdin.yml

This file was deleted.

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 @@ -139,31 +139,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 删除
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
缩容 Pump 需要**挨个**将 Pump 节点从集群中下线,然后操作 `helm upgrade` 将对应的 Pump Pod 删除。
缩容 Pump 需要先将 Pump 节点从集群中**逐一**下线,然后操作 `helm upgrade` 将对应的 Pump Pod 删除。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To scale in Pump, for each Pump node, make the node offline and delete the corresponding Pump Pod instead of making all the unwanted nodes offline and deleting the corresponding Pump Pods.

To make it clearer, how about "缩容 Pump 需要先将单个 Pump 节点从集群中下线,然后操作 helm upgrade 将对应的 Pump Pod 删除,并对每个节点重复上述步骤。"?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@juliezhang1112 Agree.


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 @@ -140,31 +140,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 删除
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
缩容 Pump 需要**挨个**将 Pump 节点从集群中下线,然后操作 `helm upgrade` 将对应的 Pump Pod 删除。
缩容 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