-
Notifications
You must be signed in to change notification settings - Fork 680
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: add offline pump document #1555
Changes from 12 commits
4135ab3
efac144
ae87f67
eb4ee43
5f06d72
e71b7e1
be79d57
f5a3a30
ea91deb
3226b9a
6a167bb
013fc08
42f5dea
2db7726
e28cded
1189912
c0283e4
03d75da
6f8d2b4
d63e98c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -126,3 +126,35 @@ The `pingcap/tidb-backup` helm chart helps restore a TiDB cluster using backup d | |||||
Incremental backup uses [TiDB Binlog](/dev/reference/tidb-binlog-overview.md) to collect binlog data from TiDB and provide real-time backup and replication to downstream platforms. | ||||||
|
||||||
For the detailed guide of maintaining TiDB Binlog in Kubernetes, refer to [TiDB Binlog](/dev/tidb-in-kubernetes/maintain/tidb-binlog.md). | ||||||
|
||||||
### Decrease the capability of Pump | ||||||
|
||||||
To decrease the capability of Pump, make Pump nodes offline and then run the `helm upgrade` command to delete Pump pods. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
"Pod" needs to be capitalized. ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-overview/ |
||||||
|
||||||
1. Make Pump nodes offline from the TiDB cluster | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
Suppose there are 3 Pump nodes, and you want to get the third node offline and modify `<ordinal-id>` to `2`, run the following command. `<version>` is the current version of TiDB. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
{{< 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 | ||||||
``` | ||||||
|
||||||
Then, check the log output of Pump. If Pump outputs `pump offline, please delete my pod`, the state of the Pump node is successfully switched to `offline`. | ||||||
|
||||||
{{< copyable "shell-regular" >}} | ||||||
|
||||||
```shell | ||||||
kubectl logs -f -n <namespace> <release-name>-pump-<ordinal-id> | ||||||
``` | ||||||
|
||||||
2. Delete Pump pods | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
Modify `binlog.pump.replicas` in the `values.yaml` file to `2` and then, run the following command to delete Pump pods. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
{{< copyable "shell-regular" >}} | ||||||
|
||||||
```shell | ||||||
helm upgrade <release-name> pingcap/tidb-cluster -f values.yaml --version=<chart-version> | ||||||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use
Scale down
instead ofDecrease the capability of
?