Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions en/scale-a-tidb-cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@ To scale PD, TiKV, TiDB, or TiProxy horizontally, use kubectl to modify `spec.pd

For the TiKV component, it might take 3-5 minutes to scale in or out because the process involves data migration.

4. Delete the PVC for the scaled-in TiKV node.

After TiKV scales in, TiDB Operator does not automatically delete the corresponding PVC. To avoid issues during future scale-out operations, you must manually delete the PVC.

To find and delete the PVC for the scaled-in Pod, run the following commands:

```shell
kubectl get pvc -n ${namespace}
kubectl delete pvc -n ${namespace} ${pvc_name}
```

### Horizontally scale TiFlash

This section describes how to horizontally scale out or scale in TiFlash if you have deployed TiFlash in the cluster.
Expand Down
13 changes: 12 additions & 1 deletion zh/scale-a-tidb-cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,17 @@ TiDB 水平扩缩容操作指的是通过增加或减少 Pod 的数量,来达

TiKV 组件由于涉及到数据搬迁,通常需要 3 到 5 分钟来进行扩容或者缩容。

4. 删除缩容 TiKV 节点对应的 PVC。

TiKV 缩容完成后,TiDB Operator 不会自动删除对应的 PVC。为避免后续扩容失败,必须手动删除该 PVC。

执行以下命令查找并删除缩容 Pod 对应的 PVC:

```shell
kubectl get pvc -n ${namespace}
kubectl delete pvc -n ${namespace} ${pvc_name}
```

### 水平扩缩容 TiFlash

如果你部署了 TiFlash,想对 TiFlash 进行水平扩缩容,请参照本小节的步骤进行操作。
Expand Down Expand Up @@ -227,4 +238,4 @@ PD 微服务通常用于解决 PD 出现性能瓶颈的问题,提高 PD 服务

## 扩缩容故障诊断

无论是水平扩缩容、或者是垂直扩缩容,都可能遇到资源不够时造成 Pod 出现 Pending 的情况。可以参考 [Pod 处于 Pending 状态](deploy-failures.md#pod-处于-pending-状态)来进行处理。
无论是水平扩缩容、或者是垂直扩缩容,都可能遇到资源不够时造成 Pod 出现 Pending 的情况。可以参考 [Pod 处于 Pending 状态](deploy-failures.md#pod-处于-pending-状态)来进行处理。