diff --git a/.markdownlint.yaml b/.markdownlint.yaml index 33c044282..7ffcdd05d 100644 --- a/.markdownlint.yaml +++ b/.markdownlint.yaml @@ -1,97 +1,126 @@ comment: 'Rules for PingCAP docs-tidb-operator' # disable all by default + default: false # MD001 + heading-increment: true # MD003 + heading-style: style: atx # MD009 + # no-trailing-spaces: true # MD010 + no-hard-tabs: true # MD007 + ul-indent: indent: 4 # MD012 + no-multiple-blanks: true # commands-show-output: true # MD018 + no-missing-space-atx: true # MD019 + no-multiple-space-atx: true # MD022 + blanks-around-headings: true # MD023 + heading-start-left: true # MD024 + no-duplicate-heading: siblings_only: true # MD025 + single-title: front_matter_title: '' # MD026 + no-trailing-punctuation: punctuation: '.,;:!。,;:!' # MD027 + no-multiple-space-blockquote: true # MD029 + ol-prefix: style: ordered # MD030 + list-marker-space: true # MD031 + blanks-around-fences: true # MD032 + blanks-around-lists: true # MD034 + no-bare-urls: true # MD037 + no-space-in-emphasis: true # MD038 + no-space-in-code: true # MD039 + no-space-in-links: true # MD042 + no-empty-links: true -# proper-names: -# names: ['TiDB', 'TiKV', 'PingCAP'] -# code_blocks: false +# proper-names + +# names: ['TiDB', 'TiKV', 'PingCAP'] + +# code_blocks: false # MD045 + no-alt-text: true # MD046 + code-block-style: style: fenced # single-trailing-newline: true # MD041 + first-line-heading: true diff --git a/en/backup-restore-cr.md b/en/backup-restore-cr.md index 2408858fd..e242e4633 100644 --- a/en/backup-restore-cr.md +++ b/en/backup-restore-cr.md @@ -36,6 +36,13 @@ This section introduces the fields in the `Backup` CR. * `volume-snapshot`: back up data by volume snapshots. * `log`: back up log data in real time in the KV layer. +* `.spec.logSubcommand`: the subcommand for controlling the log backup status in the Backup CR. This field provides three options for managing a log backup task: + * `log-start`: Initiates a new log backup task or resumes an existing task that has been paused. Use this option to start the log backup process or to continue it from a paused state. + * `log-pause`: Temporarily pauses an active log backup task, allowing it to be resumed later using the log-start command. + * `log-stop`: Permanently stops the log backup task. When this command is issued, the Backup CR enters a stopped state and cannot be restarted. + + Note that in versions earlier than v1.5.5, this field does not exist. you could use the `logStop`: true/false field to stop or start a task. In the v1.5.5+ and v1.6.1+ verson, the `logStop` is still aviliable but not recommanded. + * `.spec.restoreMode`: the restore mode. The default value is `snapshot`, which means restoring data from snapshots in the KV layer. This field is valid only for restore and has three value options currently: * `snapshot`: restore data from snapshots in the KV layer. * `volume-snapshot`: restore data from volume snapshots. diff --git a/en/backup-restore-overview.md b/en/backup-restore-overview.md index 4a68da17b..a94d2a47f 100644 --- a/en/backup-restore-overview.md +++ b/en/backup-restore-overview.md @@ -78,6 +78,8 @@ kubectl delete backupschedule ${name} -n ${namespace} If you use TiDB Operator v1.1.2 or an earlier version, or if you use TiDB Operator v1.1.3 or a later version and set the value of `spec.cleanPolicy` to `Delete`, TiDB Operator cleans the backup data when it deletes the CR. +If you are using version 1.5.5+ or 1.6.1+, when you delete a CR, TiDB Operator will attempt to automatically stop the running log backup task. The auto-stop feature will only stop log backup tasks that are running on track; it does not handle tasks that are in an error or failed state. + If you back up cluster data using AWS EBS volume snapshots and set the value of `spec.cleanPolicy` to `Delete`, TiDB Operator deletes the CR, and cleans up the backup file and the volume snapshots on AWS. In such cases, if you need to delete the namespace, it is recommended that you first delete all the `Backup`/`BackupSchedule` CRs and then delete the namespace. diff --git a/en/backup-to-aws-s3-using-br.md b/en/backup-to-aws-s3-using-br.md index 24f0f5979..c52d4ed64 100644 --- a/en/backup-to-aws-s3-using-br.md +++ b/en/backup-to-aws-s3-using-br.md @@ -228,6 +228,24 @@ demo1-full-backup-s3 full snapshot Complete s3://my-bucket/my-full-backu You can use a `Backup` CR to describe the start and stop of a log backup task and manage the log backup data. Log backup grants permissions to remote storages in the same way as snapshot backup. In this section, the example shows log backup operations by taking a `Backup` CR named `demo1-log-backup-s3` as an example. Note that these operations assume that permissions to remote storages are granted using accessKey and secretKey. See the following detailed steps. +#### Log backup subcommands + +The logSubcommand field in the Backup CR allows you to control the status of a log backup task. There are three valid inputs for logSubcommand: + + - log-start: This command initiates a new log backup task or resumes an existing task that has been paused. It can be used to start the log backup process or resume from the paused state. + + - log-pause: This command temporarily pauses an active log backup task. The task can be resumed later using the log-start command. + + - log-stop: This command permanently stops the log backup task. When this command is issued, the Backup CR enters a stopped state and cannot be restarted. + +These commands allow fine-grained control over the lifecycle of log backup tasks, enabling start, pause, resume, and stop operations to manage log data retention in a Kubernetes environment. + + +In TiDB Operator versions earlier than v1.5.4/v1.6.0, you could use the logStop: true/false field to stop or start a task. This field is retained for backward compatibility. + +However, you must not mix logStop with logSubcommand in the same Backup CR. Doing so is unsupported, and using logStop is not recommended in later versions. Stick to logSubcommand for better clarity and consistency. + + #### Start log backup 1. In the `backup-test` namespace, create a `Backup` CR named `demo1-log-backup-s3`. @@ -247,6 +265,7 @@ You can use a `Backup` CR to describe the start and stop of a log backup task an namespace: backup-test spec: backupMode: log + logSubcommand: log-start br: cluster: demo1 clusterNamespace: test1 @@ -308,15 +327,101 @@ Conditions: Log Checkpoint Ts: 436569119308644661 ``` +#### Pause log backup + +Because you already created a `Backup` CR named `demo1-log-backup-s3` when you started log backup, you can pause the log backup by modifying the same `Backup` CR. + +```shell +kubectl edit backup demo1-log-backup-s3 -n backup-test +``` + +To pause the log backup task, you only need to change the `logSubcommand` from `log-start` to `log-pause`. Then save and quit the editor. The modified content is as follows: + +```yaml +--- +apiVersion: pingcap.com/v1alpha1 +kind: Backup +metadata: + name: demo1-log-backup-s3 + namespace: backup-test +spec: + backupMode: log + logSubcommand: log-pause + br: + cluster: demo1 + clusterNamespace: test1 + sendCredToTikv: true + s3: + provider: aws + secretName: s3-secret + region: us-west-1 + bucket: my-bucket + prefix: my-log-backup-folder +``` + +You can see the `STATUS` of the `Backup` CR named `demo1-log-backup-s3` change from `Running` to `Pause`: + +```shell +kubectl get backup -n backup-test +``` + +``` +NAME MODE STATUS .... +demo1-log-backup-s3 log Pause .... +``` + +#### Resume log backup + +If a log backup task is paused, you could set `logSubcommand: log-start` to resume it. Be aware that, you couldn't resume a task from `Fail` or `Stopped` state. + +```shell +kubectl edit backup demo1-log-backup-s3 -n backup-test +``` + +To resume the log backup task, you only need to change the `logSubcommand` from `log-pause` to `log-start`. Then save and quit the editor. The modified content is as follows: + +```yaml +--- +apiVersion: pingcap.com/v1alpha1 +kind: Backup +metadata: + name: demo1-log-backup-s3 + namespace: backup-test +spec: + backupMode: log + logSubcommand: log-start + br: + cluster: demo1 + clusterNamespace: test1 + sendCredToTikv: true + s3: + provider: aws + secretName: s3-secret + region: us-west-1 + bucket: my-bucket + prefix: my-log-backup-folder +``` + +You can see the `STATUS` of the `Backup` CR named `demo1-log-backup-s3` change from `Pause` to `Running`: + +```shell +kubectl get backup -n backup-test +``` + +``` +NAME MODE STATUS .... +demo1-log-backup-s3 log Running .... +``` + #### Stop log backup -Because you already created a `Backup` CR named `demo1-log-backup-s3` when you started log backup, you can stop the log backup by modifying the same `Backup` CR. The priority of all operations is: stop log backup > delete log backup data > start log backup. +Because you already created a `Backup` CR named `demo1-log-backup-s3` when you started log backup, you can stop the log backup by modifying the same `Backup` CR. ```shell kubectl edit backup demo1-log-backup-s3 -n backup-test ``` -In the last line of the CR, append `spec.logStop: true`. Then save and quit the editor. The modified content is as follows: +Change the `logSubcommand` to `log-stop`. Then save and quit the editor. The modified content is as follows: ```yaml --- @@ -327,6 +432,7 @@ metadata: namespace: backup-test spec: backupMode: log + logSubcommand: log-stop br: cluster: demo1 clusterNamespace: test1 @@ -337,7 +443,6 @@ spec: region: us-west-1 bucket: my-bucket prefix: my-log-backup-folder - logStop: true ``` You can see the `STATUS` of the `Backup` CR named `demo1-log-backup-s3` change from `Running` to `Stopped`: @@ -352,12 +457,14 @@ demo1-log-backup-s3 log Stopped .... ``` -You can also stop log backup by taking the same steps as in [Start log backup](#start-log-backup). The existing `Backup` CR will be updated. +Stopped is the terminated state of a log backup CR, you couldn't change the state again, but you still could clean log backup data. + +In TiDB Operator versions earlier than v1.5.4/v1.6.0, you could use the logStop: true/false field to stop or start a task. This field is retained for backward compatibility. #### Clean log backup data -1. Because you already created a `Backup` CR named `demo1-log-backup-s3` when you started log backup, you can clean the log data backup by modifying the same `Backup` CR. The priority of all operations is: stop log backup > delete log backup data > start log backup. The following example shows how to clean log backup data generated before 2022-10-10T15:21:00+08:00. +1. Because you already created a `Backup` CR named `demo1-log-backup-s3` when you started log backup, you can clean the log data backup by modifying the same `Backup` CR. The following example shows how to clean log backup data generated before 2022-10-10T15:21:00+08:00. ```shell kubectl edit backup demo1-log-backup-s3 -n backup-test @@ -374,6 +481,7 @@ You can also stop log backup by taking the same steps as in [Start log backup](# namespace: backup-test spec: backupMode: log + logSubcommand: log-start/log-pause/log-stop br: cluster: demo1 clusterNamespace: test1 diff --git a/en/backup-to-azblob-using-br.md b/en/backup-to-azblob-using-br.md index 49a7cf8f7..c27da0c54 100644 --- a/en/backup-to-azblob-using-br.md +++ b/en/backup-to-azblob-using-br.md @@ -139,6 +139,24 @@ demo1-full-backup-azblob full snapshot Complete azure://my-container/my- You can use a `Backup` CR to describe the start and stop of a log backup task and manage the log backup data. In this section, the example shows how to create a `Backup` CR named `demo1-log-backup-azblob`. See the following detailed steps. +#### Log backup subcommands + +The logSubcommand field in the Backup CR allows you to control the status of a log backup task. There are three valid inputs for logSubcommand: + +- log-start: This command initiates a new log backup task or resumes an existing task that has been paused. It can be used to start the log backup process or resume from the paused state. + +- log-pause: This command temporarily pauses an active log backup task. The task can be resumed later using the log-start command. + +- log-stop: This command permanently stops the log backup task. When this command is issued, the Backup CR enters a stopped state and cannot be restarted. + +These commands allow fine-grained control over the lifecycle of log backup tasks, enabling start, pause, resume, and stop operations to manage log data retention in a Kubernetes environment. + + +In TiDB Operator versions earlier than v1.5.4/v1.6.0, you could use the logStop: true/false field to stop or start a task. This field is retained for backward compatibility. + +However, you must not mix logStop with logSubcommand in the same Backup CR. Doing so is unsupported, and using logStop is not recommended in later versions. Stick to logSubcommand for better clarity and consistency. + + #### Start log backup 1. In the `backup-test` namespace, create a `Backup` CR named `demo1-log-backup-azblob`. @@ -158,6 +176,7 @@ You can use a `Backup` CR to describe the start and stop of a log backup task an namespace: backup-test spec: backupMode: log + logSubcommand: log-start br: cluster: demo1 clusterNamespace: test1 @@ -218,15 +237,99 @@ Conditions: Log Checkpoint Ts: 436569119308644661 ``` +#### Pause log backup + +Because you already created a `Backup` CR named `demo1-log-backup-azblob` when you started log backup, you can pause the log backup by modifying the same `Backup` CR. + +```shell +kubectl edit backup log-backup-azblob -n backup-test +``` + +To pause the log backup task, you only need to change the `logSubcommand` from `log-start` to `log-pause`. Then save and quit the editor. The modified content is as follows: + + ```yaml + --- + apiVersion: pingcap.com/v1alpha1 + kind: Backup + metadata: + name: demo1-log-backup-azblob + namespace: backup-test + spec: + backupMode: log + logSubcommand: log-pause + br: + cluster: demo1 + clusterNamespace: test1 + sendCredToTikv: true + azblob: + secretName: azblob-secret + container: my-container + prefix: my-log-backup-folder + #accessTier: Hot + ``` + +You can see the `STATUS` of the `Backup` CR named `log-backup-azblob` change from `Running` to `Pause`: + +```shell +kubectl get backup -n backup-test +``` + +``` +NAME MODE STATUS .... +log-backup-azblob log Pause .... +``` + +#### Resume log backup + +If a log backup task is paused, you could set `logSubcommand: log-start` to resume it. Be aware that, you couldn't resume a task from `Fail` or `Stopped` state. + +```shell +kubectl edit backup log-backup-azblob.yaml -n backup-test +``` + +To resume the log backup task, you only need to change the `logSubcommand` from `log-pause` to `log-start`. Then save and quit the editor. The modified content is as follows: + + ```yaml + --- + apiVersion: pingcap.com/v1alpha1 + kind: Backup + metadata: + name: demo1-log-backup-azblob + namespace: backup-test + spec: + backupMode: log + logSubcommand: log-start + br: + cluster: demo1 + clusterNamespace: test1 + sendCredToTikv: true + azblob: + secretName: azblob-secret + container: my-container + prefix: my-log-backup-folder + #accessTier: Hot + ``` + +You can see the `STATUS` of the `Backup` CR named `log-backup-azblob` change from `Pause` to `Running`: + +```shell +kubectl get backup -n backup-test +``` + +``` +NAME MODE STATUS .... +log-backup-azblob log Running .... +``` + #### Stop log backup -Because you already created a `Backup` CR named `demo1-log-backup-azblob` when you started log backup, you can stop the log backup by modifying the same `Backup` CR. The priority of all operations is: stop log backup > delete log backup data > start log backup. +Because you already created a `Backup` CR named `demo1-log-backup-azblob` when you started log backup, you can stop the log backup by modifying the same `Backup` CR. ```shell kubectl edit backup demo1-log-backup-azblob -n backup-test ``` -In the last line of the CR, append `spec.logStop: true`. Then save and quit the editor. The modified content is as follows: +Change the `logSubcommand` to `log-stop`. Then save and quit the editor. The modified content is as follows: ```yaml --- @@ -237,6 +340,7 @@ metadata: namespace: backup-test spec: backupMode: log + logSubcommand: log-stop br: cluster: demo1 clusterNamespace: test1 @@ -246,7 +350,6 @@ spec: container: my-container prefix: my-log-backup-folder #accessTier: Hot - logStop: true ``` You can see the `STATUS` of the `Backup` CR named `demo1-log-backup-azblob` change from `Running` to `Stopped`: @@ -261,12 +364,14 @@ demo1-log-backup-azblob log Stopped .... ``` -You can stop log backup by taking the same steps as in [Start log backup](#start-log-backup). The existing `Backup` CR will be updated. +Stopped is the terminated state of a log backup CR, you couldn't change the state again, but you still could clean log backup data. + +In TiDB Operator versions earlier than v1.5.4/v1.6.0, you could use the logStop: true/false field to stop or start a task. This field is retained for backward compatibility. #### Clean log backup data -1. Because you already created a `Backup` CR named `demo1-log-backup-azblob` when you started log backup, you can clean the log data backup by modifying the same `Backup` CR. The priority of all operations is: stop log backup > delete log backup data > start log backup. The following example shows how to clean log backup data generated before 2022-10-10T15:21:00+08:00. +1. Because you already created a `Backup` CR named `demo1-log-backup-azblob` when you started log backup, you can clean the log data backup by modifying the same `Backup` CR. The following example shows how to clean log backup data generated before 2022-10-10T15:21:00+08:00. ```shell kubectl edit backup demo1-log-backup-azblob -n backup-test @@ -283,6 +388,7 @@ You can stop log backup by taking the same steps as in [Start log backup](#start namespace: backup-test spec: backupMode: log + logSubcommand: log-start/log-pause/log-stop br: cluster: demo1 clusterNamespace: test1 diff --git a/en/backup-to-gcs-using-br.md b/en/backup-to-gcs-using-br.md index 1ae57c95d..9a416bfff 100644 --- a/en/backup-to-gcs-using-br.md +++ b/en/backup-to-gcs-using-br.md @@ -142,7 +142,25 @@ demo1-full-backup-gcs full snapshot Complete gcs://my-bucket/my-full-bac ### Log backup -You can use a `Backup` CR to describe the start and stop of a log backup task and manage the log backup data. Log backup grants permissions to remote storages in the same way as snapshot backup. In this section, the example shows how to create a `Backup` CR named `demo1-log-backup-s3`. See the following detailed steps. +You can use a `Backup` CR to describe the start and stop of a log backup task and manage the log backup data. Log backup grants permissions to remote storages in the same way as snapshot backup. In this section, the example shows how to create a `Backup` CR named `demo1-log-backup-gcs`. See the following detailed steps. + +#### Log backup subcommands + +The logSubcommand field in the Backup CR allows you to control the status of a log backup task. There are three valid inputs for logSubcommand: + +- log-start: This command initiates a new log backup task or resumes an existing task that has been paused. It can be used to start the log backup process or resume from the paused state. + +- log-pause: This command temporarily pauses an active log backup task. The task can be resumed later using the log-start command. + +- log-stop: This command permanently stops the log backup task. When this command is issued, the Backup CR enters a stopped state and cannot be restarted. + +These commands allow fine-grained control over the lifecycle of log backup tasks, enabling start, pause, resume, and stop operations to manage log data retention in a Kubernetes environment. + + +In TiDB Operator versions earlier than v1.5.4/v1.6.0, you could use the logStop: true/false field to stop or start a task. This field is retained for backward compatibility. + +However, you must not mix logStop with logSubcommand in the same Backup CR. Doing so is unsupported, and using logStop is not recommended in later versions. Stick to logSubcommand for better clarity and consistency. + #### Start log backup @@ -223,15 +241,99 @@ Conditions: Log Checkpoint Ts: 436569119308644661 ``` +#### Pause log backup + +Because you already created a `Backup` CR named `demo1-log-backup-gcs` when you started log backup, you can pause the log backup by modifying the same `Backup` CR. + +```shell +kubectl edit backup demo1-log-backup-gcs -n backup-test +``` + +To pause the log backup task, you only need to change the `logSubcommand` from `log-start` to `log-pause`. Then save and quit the editor. The modified content is as follows: + +```yaml +--- +apiVersion: pingcap.com/v1alpha1 +kind: Backup +metadata: + name: demo1-log-backup-gcs + namespace: backup-test +spec: + backupMode: log + logSubcommand: log-pause + br: + cluster: demo1 + clusterNamespace: test1 + sendCredToTikv: true + gcs: + projectId: ${project_id} + secretName: gcs-secret + bucket: my-bucket + prefix: my-log-backup-folder +``` + +You can see the `STATUS` of the `Backup` CR named `demo1-log-backup-gcs` change from `Running` to `Pause`: + +```shell +kubectl get backup -n backup-test +``` + +``` +NAME MODE STATUS .... +demo1-log-backup-gcs log Pause .... +``` + +#### Resume log backup + +If a log backup task is paused, you could set `logSubcommand: log-start` to resume it. Be aware that, you couldn't resume a task from `Fail` or `Stopped` state. + +```shell +kubectl edit backup demo1-log-backup-gcs -n backup-test +``` + +To resume the log backup task, you only need to change the `logSubcommand` from `log-pause` to `log-start`. Then save and quit the editor. The modified content is as follows: + +```yaml +--- +apiVersion: pingcap.com/v1alpha1 +kind: Backup +metadata: + name: demo1-log-backup-gcs + namespace: backup-test +spec: + backupMode: log + logSubcommand: log-start + br: + cluster: demo1 + clusterNamespace: test1 + sendCredToTikv: true + gcs: + projectId: ${project_id} + secretName: gcs-secret + bucket: my-bucket + prefix: my-log-backup-folder +``` + +You can see the `STATUS` of the `Backup` CR named `demo1-log-backup-gcs` change from `Pause` to `Running`: + +```shell +kubectl get backup -n backup-test +``` + +``` +NAME MODE STATUS .... +demo1-log-backup-gcs log Running .... +``` + #### Stop log backup -Because you already created a `Backup` CR named `demo1-log-backup-gcs` when you started log backup, you can stop the log backup by modifying the same `Backup` CR. The priority of all operations is: stop log backup > delete log backup data > start log backup. +Because you already created a `Backup` CR named `demo1-log-backup-gcs` when you started log backup, you can stop the log backup by modifying the same `Backup` CR. ```shell kubectl edit backup demo1-log-backup-gcs -n backup-test ``` -In the last line of the CR, append `spec.logStop: true`. Then save and quit the editor. The modified content is as follows: +Change the `logSubcommand` to `log-stop`. Then save and quit the editor. The modified content is as follows: ```yaml --- @@ -242,6 +344,7 @@ metadata: namespace: backup-test spec: backupMode: log + logSubcommand: log-stop br: cluster: demo1 clusterNamespace: test1 @@ -251,7 +354,6 @@ spec: secretName: gcs-secret bucket: my-bucket prefix: my-log-backup-folder - logStop: true ``` You can see the `STATUS` of the `Backup` CR named `demo1-log-backup-gcs` change from `Running` to `Stopped`: @@ -266,12 +368,14 @@ demo1-log-backup-gcs log Stopped .... ``` -You can also stop log backup by taking the same steps as in [Start log backup](#start-log-backup). The existing `Backup` CR will be updated. +Stopped is the terminated state of a log backup CR, you couldn't change the state again, but you still could clean log backup data. + +In TiDB Operator versions earlier than v1.5.4/v1.6.0, you could use the logStop: true/false field to stop or start a task. This field is retained for backward compatibility. #### Clean log backup data -1. Because you already created a `Backup` CR named `demo1-log-backup-gcs` when you started log backup, you can clean the log data backup by modifying the same `Backup` CR. The priority of all operations is: stop log backup > delete log backup data > start log backup. The following example shows how to clean log backup data generated before 2022-10-10T15:21:00+08:00. +1. Because you already created a `Backup` CR named `demo1-log-backup-gcs` when you started log backup, you can clean the log data backup by modifying the same `Backup` CR. The following example shows how to clean log backup data generated before 2022-10-10T15:21:00+08:00. ```shell kubectl edit backup demo1-log-backup-gcs -n backup-test @@ -288,6 +392,7 @@ You can also stop log backup by taking the same steps as in [Start log backup](# namespace: backup-test spec: backupMode: log + logSubcommand: log-start/log-pause/log-stop br: cluster: demo1 clusterNamespace: test1 diff --git a/en/deploy-tidb-from-kubernetes-gke.md b/en/deploy-tidb-from-kubernetes-gke.md index f4f727352..3974f5c9e 100644 --- a/en/deploy-tidb-from-kubernetes-gke.md +++ b/en/deploy-tidb-from-kubernetes-gke.md @@ -8,7 +8,9 @@ aliases: ['/docs/tidb-in-kubernetes/dev/deploy-tidb-from-kubernetes-gke/'] This document is designed to be directly [run in Google Cloud Shell](https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https://github.com/pingcap/docs-tidb-operator&cloudshell_tutorial=en/deploy-tidb-from-kubernetes-gke.md). - + + Google Cloud Shell + It takes you through the following steps: diff --git a/en/renew-tls-certificate.md b/en/renew-tls-certificate.md index 6fee2cddf..2826837d2 100644 --- a/en/renew-tls-certificate.md +++ b/en/renew-tls-certificate.md @@ -110,7 +110,7 @@ If the original TLS certificates are issued by [the `cfssl` system](enable-tls-b > **Note:** > - > The above command only renews the server-side and the client-side certificate between PD, TiKV, and TiDB components. If you need to renew the server-side certificates for other components, such as TiCDC, TiFlash and TiProxy, you can execute the similar command. + > The above command only renews the server-side and the client-side certificate between PD, TiKV, and TiDB components. If you need to renew the server-side certificates for other components, such as TiCDC, TiFlash and TiProxy, you can execute the similar command. 3. [Perform the rolling restart](restart-a-tidb-cluster.md) to components that need to load the new certificates. diff --git a/zh/backup-restore-cr.md b/zh/backup-restore-cr.md index 6ac9cea4c..579f6379e 100644 --- a/zh/backup-restore-cr.md +++ b/zh/backup-restore-cr.md @@ -34,6 +34,11 @@ summary: 介绍用于备份与恢复的 Custom Resource (CR) 资源的各字段 * `volume-snapshot`:基于卷快照的备份。 * `log`:从 KV 层备份实时数据变更日志数据。 +* `.spec.logSubcommand`:指定日志备份任务的子命令,用于控制日志备份任务的状态。该字段提供以下三种选项: + * `log-start`:启动一个新的日志备份任务,或恢复一个已暂停的任务。可以用于开始日志备份流程或从暂停状态恢复。 + * `log-pause`:暂时暂停正在运行的日志备份任务,可以稍后使用 log-start 命令恢复任务。 + * `log-stop`:永久停止日志备份任务。当此命令发出后,Backup CR 进入停止状态,无法再次启动。 + * `.spec.restoreMode`:指定 Restore 的模式,默认为 `snapshot`,即基于 KV 层的快照恢复。该字段仅在恢复时有效,目前支持以下三种类型: * `snapshot`:基于 KV 层的快照恢复。 * `volume-snapshot`:基于卷快照的 TiDB 集群恢复。 diff --git a/zh/backup-restore-overview.md b/zh/backup-restore-overview.md index d0f763f51..f699c0906 100644 --- a/zh/backup-restore-overview.md +++ b/zh/backup-restore-overview.md @@ -78,6 +78,8 @@ kubectl delete backupschedule ${name} -n ${namespace} 如果你使用 v1.1.2 及以前版本,或使用 v1.1.3 及以后版本并将 `spec.cleanPolicy` 设置为 `Delete` 时,TiDB Operator 在删除 CR 时会同时清理备份文件。 +如果你使用 v1.5.5, v1.6.1 及以后的版本,当你删除 CR 时,TiDB Operator 会尝试自动停止正在运行的日志备份任务。自动停止功能只会停止正常运行的日志备份任务,并不处理错误或者失败的任务。 + 如果你使用基于 AWS EBS 卷快照的备份,并将 `spec.cleanPolicy` 设置为 `Delete` 时,TiDB Operator 在删除 CR 以及清理备份文件的同时删除 AWS 上相关的所有卷快照。 在满足上述条件时,如果需要删除 namespace,建议首先删除所有的 Backup/BackupSchedule CR,再删除 namespace。 diff --git a/zh/backup-to-aws-s3-using-br.md b/zh/backup-to-aws-s3-using-br.md index a6f95ea0d..7174d6ddf 100644 --- a/zh/backup-to-aws-s3-using-br.md +++ b/zh/backup-to-aws-s3-using-br.md @@ -225,6 +225,24 @@ demo1-full-backup-s3 full snapshot Complete s3://my-bucket/my-full-backu 你可以使用一个 `Backup` CR 来描述日志备份任务的启动、停止以及清理日志备份数据等操作。日志备份对远程存储访问授权方式与快照备份一致。本节示例创建了名为 `demo1-log-backup-s3` 的 `Backup` CR,对远程存储访问授权方式仅以通过 accessKey 和 secretKey 的方式为例,具体操作如下所示。 +#### 日志备份的`logSubcommand` + +Backup 自定义资源(CR)中的 logSubcommand 字段允许你控制日志备份任务的状态。logSubcommand 有三个有效输入: + + - log-start:该命令用于启动新的日志备份任务,或恢复已暂停的任务。它可用于启动日志备份进程或从暂停状态恢复任务。 + + - log-pause:该命令用于暂时暂停活动中的日志备份任务。稍后可以通过 log-start 命令恢复任务。 + + - log-stop:该命令永久停止日志备份任务。当执行此命令时,Backup CR 将进入停止状态且无法重启。 + +这些命令使日志备份任务的生命周期控制更加精细,支持启动、暂停、恢复和停止操作,以管理 Kubernetes 环境中的日志数据保留。 + + +在 v1.5.4/v1.6.0 及更早版本的 TiDB Operator 中,可以使用 logStop: true/false 字段来停止或启动任务。此字段为了向后兼容而保留。 + +但请勿在同一个 Backup CR 中混用 logStop 和 logSubcommand,这属于不支持的用法。在较新版本中,不推荐使用 logStop,建议使用 logSubcommand 以确保配置清晰且一致。 + + #### 启动日志备份 1. 在 `backup-test` 这个 namespace 中创建一个名为 `demo1-log-backup-s3` 的 `Backup` CR。 @@ -305,15 +323,101 @@ Conditions: Log Checkpoint Ts: 436569119308644661 ``` +#### 暂停日志备份 + +由于在启动日志备份时已经创建了名为 `demo1-log-backup-s3` 的 Backup 自定义资源(CR),可以通过修改相同的 Backup CR 来暂停日志备份。 + +```shell +kubectl edit backup demo1-log-backup-s3 -n backup-test +``` + +要暂停日志备份任务,只需将 logSubcommand 从 log-start 更改为 log-pause。然后保存并退出编辑器。修改后的内容如下: + +```yaml +--- +apiVersion: pingcap.com/v1alpha1 +kind: Backup +metadata: + name: demo1-log-backup-s3 + namespace: backup-test +spec: + backupMode: log + logSubcommand: log-pause + br: + cluster: demo1 + clusterNamespace: test1 + sendCredToTikv: true + s3: + provider: aws + secretName: s3-secret + region: us-west-1 + bucket: my-bucket + prefix: my-log-backup-folder +``` + +可以看到名为 `demo1-log-backup-s3` 的 `Backup` CR 的 `STATUS` 从 `Running` 变成了 `Pause`: + +```shell +kubectl get backup -n backup-test +``` + +``` +NAME MODE STATUS .... +demo1-log-backup-s3 log Pause .... +``` + +#### 恢复日志备份 + +如果日志备份任务已暂停,可以将 logSubcommand 设置为 log-start 来恢复它。请注意,你无法从 Fail 或 Stopped 状态恢复任务。 + +```shell +kubectl edit backup demo1-log-backup-s3 -n backup-test +``` + +要恢复日志备份任务,只需将 logSubcommand 从 log-pause 更改为 log-start。然后保存并退出编辑器。修改后的内容如下: + +```yaml +--- +apiVersion: pingcap.com/v1alpha1 +kind: Backup +metadata: + name: demo1-log-backup-s3 + namespace: backup-test +spec: + backupMode: log + logSubcommand: log-start + br: + cluster: demo1 + clusterNamespace: test1 + sendCredToTikv: true + s3: + provider: aws + secretName: s3-secret + region: us-west-1 + bucket: my-bucket + prefix: my-log-backup-folder +``` + +可以看到名为 demo1-log-backup-s3 的 Backup CR 的 STATUS 从 Paused 状态变为 Running: + +```shell +kubectl get backup -n backup-test +``` + +``` +NAME MODE STATUS .... +demo1-log-backup-s3 log Running .... +``` + #### 停止日志备份 -由于你在开启日志备份的时候已经创建了名为 `demo1-log-backup-s3` 的 `Backup` CR,因此可以直接更新该 `Backup` CR 的配置,来激活停止日志备份的操作。操作激活优先级从高到低分别是停止日志备份任务、删除日志备份数据和开启日志备份任务。 +由于你在开启日志备份的时候已经创建了名为 `demo1-log-backup-s3` 的 `Backup` CR,因此可以直接更新该 `Backup` CR 的配置,停止日志备份。 ```shell kubectl edit backup demo1-log-backup-s3 -n backup-test ``` -在最后新增一行字段 `spec.logStop: true`,保存并退出。更新后的内容如下: +将 logSubcommand 更改为 log-stop。然后保存并退出编辑器。修改后的内容如下: ```yaml --- @@ -324,6 +428,7 @@ metadata: namespace: backup-test spec: backupMode: log + logSubcommand: log-stop br: cluster: demo1 clusterNamespace: test1 @@ -334,7 +439,6 @@ spec: region: us-west-1 bucket: my-bucket prefix: my-log-backup-folder - logStop: true ``` 可以看到名为 `demo1-log-backup-s3` 的 `Backup` CR 的 `STATUS` 从 `Running` 变成了 `Stopped`: @@ -349,12 +453,14 @@ demo1-log-backup-s3 log Stopped .... ``` -你也可以采用和启动日志备份时相同的方法来停止日志备份,已经被创建过的 `Backup` CR 会因此被更新。 +Stopped 是日志备份的终止状态,此状态下无法再次更改状态,但你仍然可以清理日志备份的数据。 + +在 v1.5.4/v1.6.0 及更早版本的 TiDB Operator 中,可以使用 logStop: true/false 字段来停止或启动任务。此字段为了向后兼容而保留。 #### 清理日志备份数据 -1. 由于你在开启日志备份的时候已经创建了名为 `demo1-log-backup-s3` 的 `Backup` CR,因此可以直接更新该 `Backup` CR 的配置,来激活清理日志备份数据的操作。操作激活优先级从高到低分别是停止日志备份任务、删除日志备份数据和开启日志备份任务。执行如下操作来清理 2022-10-10T15:21:00+08:00 之前的所有日志备份数据。 +1. 由于你在开启日志备份的时候已经创建了名为 `demo1-log-backup-s3` 的 `Backup` CR,因此可以直接更新该 `Backup` CR 的配置,来激活清理日志备份数据的操作。执行如下操作来清理 2022-10-10T15:21:00+08:00 之前的所有日志备份数据。 ```shell kubectl edit backup demo1-log-backup-s3 -n backup-test @@ -371,6 +477,7 @@ demo1-log-backup-s3 log Stopped .... namespace: backup-test spec: backupMode: log + logSubcommand: log-start/log-pause/log-stop br: cluster: demo1 clusterNamespace: test1 diff --git a/zh/backup-to-azblob-using-br.md b/zh/backup-to-azblob-using-br.md index 741626ad9..1938edeea 100644 --- a/zh/backup-to-azblob-using-br.md +++ b/zh/backup-to-azblob-using-br.md @@ -140,6 +140,24 @@ demo1-full-backup-azblob full snapshot Complete azure://my-container/my- 你可以使用一个 `Backup` CR 来描述日志备份任务的启动、停止以及清理日志备份数据等操作。本节示例创建了名为 `demo1-log-backup-azblob` 的 `Backup` CR。具体操作如下所示。 +#### 日志备份的`logSubcommand` + +Backup 自定义资源(CR)中的 logSubcommand 字段允许你控制日志备份任务的状态。logSubcommand 有三个有效输入: + +- log-start:该命令用于启动新的日志备份任务,或恢复已暂停的任务。它可用于启动日志备份进程或从暂停状态恢复任务。 + +- log-pause:该命令用于暂时暂停活动中的日志备份任务。稍后可以通过 log-start 命令恢复任务。 + +- log-stop:该命令永久停止日志备份任务。当执行此命令时,Backup CR 将进入停止状态且无法重启。 + +这些命令使日志备份任务的生命周期控制更加精细,支持启动、暂停、恢复和停止操作,以管理 Kubernetes 环境中的日志数据保留。 + + +在 v1.5.4/v1.6.0 及更早版本的 TiDB Operator 中,可以使用 logStop: true/false 字段来停止或启动任务。此字段为了向后兼容而保留。 + +但请勿在同一个 Backup CR 中混用 logStop 和 logSubcommand,这属于不支持的用法。在较新版本中,不推荐使用 logStop,建议使用 logSubcommand 以确保配置清晰且一致。 + + #### 启动日志备份 1. 在 `backup-test` 这个 namespace 中创建一个名为 `demo1-log-backup-azblob` 的 `Backup` CR。 @@ -219,15 +237,107 @@ Conditions: Log Checkpoint Ts: 436569119308644661 ``` +#### 暂停日志备份 + +由于在启动日志备份时已经创建了名为 `demo1-log-backup-azblob` 的 Backup 自定义资源(CR),可以通过修改相同的 Backup CR 来暂停日志备份。 + +```shell +kubectl edit backup demo1-log-backup-azblob -n backup-test +``` + +要暂停日志备份任务,只需将 logSubcommand 从 log-start 更改为 log-pause。然后保存并退出编辑器。修改后的内容如下: + + ```shell + kubectl apply -f log-backup-azblob.yaml + ``` + + `log-backup-azblob.yaml` 文件内容如下: + + ```yaml + --- + apiVersion: pingcap.com/v1alpha1 + kind: Backup + metadata: + name: demo1-log-backup-azblob + namespace: backup-test + spec: + backupMode: log + logSubcommand: log-pause + br: + cluster: demo1 + clusterNamespace: test1 + sendCredToTikv: true + s3: + provider: aws + secretName: s3-secret + region: us-west-1 + bucket: my-bucket + prefix: my-log-backup-folder + ``` + +可以看到名为 `demo1-log-backup-azblob` 的 `Backup` CR 的 `STATUS` 从 `Running` 变成了 `Pause`: + +```shell +kubectl get backup -n backup-test +``` + +``` +NAME MODE STATUS .... +demo1-log-backup-azblob log Pause .... +``` + +#### 恢复日志备份 + +如果日志备份任务已暂停,可以将 logSubcommand 设置为 log-start 来恢复它。请注意,你无法从 Fail 或 Stopped 状态恢复任务。 + +```shell +kubectl edit backup demo1-log-backup-azblob -n backup-test +``` + +要恢复日志备份任务,只需将 logSubcommand 从 log-pause 更改为 log-start。然后保存并退出编辑器。修改后的内容如下: + +```yaml +--- +apiVersion: pingcap.com/v1alpha1 +kind: Backup +metadata: + name: demo1-log-backup-azblob + namespace: backup-test +spec: + backupMode: log + logSubcommand: log-start + br: + cluster: demo1 + clusterNamespace: test1 + sendCredToTikv: true + s3: + provider: aws + secretName: s3-secret + region: us-west-1 + bucket: my-bucket + prefix: my-log-backup-folder +``` + +可以看到名为 demo1-log-backup-azblob 的 Backup CR 的 STATUS 从 Paused 状态变为 Running: + +```shell +kubectl get backup -n backup-test +``` + +``` +NAME MODE STATUS .... +demo1-log-backup-azblob log Running .... +``` + #### 停止日志备份 -由于你在开启日志备份的时候已经创建了名为 `demo1-log-backup-azblob` 的 `Backup` CR,因此可以直接更新该 `Backup` CR 的配置,来激活停止日志备份的操作。操作激活优先级从高到低分别是停止日志备份任务、删除日志备份数据和开启日志备份任务。 +由于你在开启日志备份的时候已经创建了名为 `demo1-log-backup-azblob` 的 `Backup` CR,因此可以直接更新该 `Backup` CR 的配置,停止日志备份。 ```shell kubectl edit backup demo1-log-backup-azblob -n backup-test ``` -在最后新增一行字段 `spec.logStop: true`,保存并退出。更新后的内容如下: +将 logSubcommand 更改为 log-stop。然后保存并退出编辑器。修改后的内容如下: ```yaml --- @@ -238,6 +348,7 @@ metadata: namespace: backup-test spec: backupMode: log + logSubcommand: log-stop br: cluster: demo1 clusterNamespace: test1 @@ -247,7 +358,6 @@ spec: container: my-container prefix: my-log-backup-folder #accessTier: Hot - logStop: true ``` 可以看到名为 `demo1-log-backup-azblob` 的 `Backup` CR 的 `STATUS` 从 `Running` 变成了 `Stopped`: @@ -262,12 +372,14 @@ demo1-log-backup-azblob log Stopped .... ``` -你也可以采用和启动日志备份时相同的方法来停止日志备份,已经被创建过的 `Backup` CR 会因此被更新。 +Stopped 是日志备份的终止状态,此状态下无法再次更改状态,但你仍然可以清理日志备份的数据。 + +在 v1.5.4/v1.6.0 及更早版本的 TiDB Operator 中,可以使用 logStop: true/false 字段来停止或启动任务。此字段为了向后兼容而保留。 #### 清理日志备份数据 -1. 由于你在开启日志备份的时候已经创建了名为 `demo1-log-backup-azblob` 的 `Backup` CR,因此可以直接更新该 `Backup` CR 的配置,来激活清理日志备份数据的操作。操作激活优先级从高到低分别是停止日志备份任务、删除日志备份数据和开启日志备份任务。执行如下操作来清理 2022-10-10T15:21:00+08:00 之前的所有日志备份数据。 +1. 由于你在开启日志备份的时候已经创建了名为 `demo1-log-backup-azblob` 的 `Backup` CR,因此可以直接更新该 `Backup` CR 的配置,来激活清理日志备份数据的操作。执行如下操作来清理 2022-10-10T15:21:00+08:00 之前的所有日志备份数据。 ```shell kubectl edit backup demo1-log-backup-azblob -n backup-test @@ -284,6 +396,7 @@ demo1-log-backup-azblob log Stopped .... namespace: backup-test spec: backupMode: log + logSubcommand: log-start/log-pause/log-stop br: cluster: demo1 clusterNamespace: test1 diff --git a/zh/backup-to-gcs-using-br.md b/zh/backup-to-gcs-using-br.md index 112f4fc32..2b07556f1 100644 --- a/zh/backup-to-gcs-using-br.md +++ b/zh/backup-to-gcs-using-br.md @@ -144,6 +144,24 @@ demo1-full-backup-gcs full snapshot Complete gcs://my-bucket/my-full-bac 你可以使用一个 `Backup` CR 来描述日志备份任务的启动、停止以及清理日志备份数据等操作。日志备份对远程存储访问授权方式与快照备份一致。本节示例创建了名为 `demo1-log-backup-gcs` 的 `Backup` CR,具体操作如下所示。 +#### 日志备份的`logSubcommand` + +Backup 自定义资源(CR)中的 logSubcommand 字段允许你控制日志备份任务的状态。logSubcommand 有三个有效输入: + +- log-start:该命令用于启动新的日志备份任务,或恢复已暂停的任务。它可用于启动日志备份进程或从暂停状态恢复任务。 + +- log-pause:该命令用于暂时暂停活动中的日志备份任务。稍后可以通过 log-start 命令恢复任务。 + +- log-stop:该命令永久停止日志备份任务。当执行此命令时,Backup CR 将进入停止状态且无法重启。 + +这些命令使日志备份任务的生命周期控制更加精细,支持启动、暂停、恢复和停止操作,以管理 Kubernetes 环境中的日志数据保留。 + + +在 v1.5.4/v1.6.0 及更早版本的 TiDB Operator 中,可以使用 logStop: true/false 字段来停止或启动任务。此字段为了向后兼容而保留。 + +但请勿在同一个 Backup CR 混用 logStop 和 logSubcommand,这属于不支持的用法。在较新版本中,不推荐使用 logStop,建议使用 logSubcommand 以确保配置清晰且一致。 + + #### 启动日志备份 1. 在 `backup-test` 这个 namespace 中创建一个名为 `demo1-log-backup-gcs` 的 `Backup` CR。 @@ -223,15 +241,99 @@ Conditions: Log Checkpoint Ts: 436569119308644661 ``` +#### 暂停日志备份 + +由于在启动日志备份时已经创建了名为 `demo1-log-backup-gcs` 的 Backup 自定义资源(CR),可以通过修改相同的 Backup CR 来暂停日志备份。 + +```shell +kubectl edit backup demo1-log-backup-gcs -n backup-test +``` + +要暂停日志备份任务,只需将 logSubcommand 从 log-start 更改为 log-pause。然后保存并退出编辑器。修改后的内容如下: + +```yaml +--- +apiVersion: pingcap.com/v1alpha1 +kind: Backup +metadata: + name: demo1-log-backup-gcs + namespace: backup-test +spec: + backupMode: log + logSubcommand: log-pause + br: + cluster: demo1 + clusterNamespace: test1 + sendCredToTikv: true + gcs: + projectId: ${project_id} + secretName: gcs-secret + bucket: my-bucket + prefix: my-log-backup-folder +``` + +可以看到名为 `demo1-log-backup-gcs` 的 `Backup` CR 的 `STATUS` 从 `Running` 变成了 `Pause`: + +```shell +kubectl get backup -n backup-test +``` + +``` +NAME MODE STATUS .... +demo1-log-backup-gcs log Pause .... +``` + +#### 恢复日志备份 + +如果日志备份任务已暂停,可以将 logSubcommand 设置为 log-start 来恢复它。请注意,你无法从 Fail 或 Stopped 状态恢复任务。 + +```shell +kubectl edit backup demo1-log-backup-gcs -n backup-test +``` + +要恢复日志备份任务,只需将 logSubcommand 从 log-pause 更改为 log-start。然后保存并退出编辑器。修改后的内容如下: + +```yaml +--- +apiVersion: pingcap.com/v1alpha1 +kind: Backup +metadata: + name: demo1-log-backup-gcs + namespace: backup-test +spec: + backupMode: log + logSubcommand: log-start + br: + cluster: demo1 + clusterNamespace: test1 + sendCredToTikv: true + gcs: + projectId: ${project_id} + secretName: gcs-secret + bucket: my-bucket + prefix: my-log-backup-folder +``` + +可以看到名为 demo1-log-backup-gcs 的 Backup CR 的 STATUS 从 Paused 状态变为 Running: + +```shell +kubectl get backup -n backup-test +``` + +``` +NAME MODE STATUS .... +demo1-log-backup-gcs log Running .... +``` + #### 停止日志备份 -由于你在开启日志备份的时候已经创建了名为 `demo1-log-backup-gcs` 的 `Backup` CR,因此可以直接更新该 `Backup` CR 的配置,来激活停止日志备份的操作。操作激活优先级从高到低分别是停止日志备份任务、删除日志备份数据和开启日志备份任务。 +由于你在开启日志备份的时候已经创建了名为 `demo1-log-backup-gcs` 的 `Backup` CR,因此可以直接更新该 `Backup` CR 的配置,来激活停止日志备份的操作。 ```shell kubectl edit backup demo1-log-backup-gcs -n backup-test ``` -在最后新增一行字段 `spec.logStop: true`,保存并退出。更新后的内容如下: +将 logSubcommand 更改为 log-stop。然后保存并退出编辑器。修改后的内容如下: ```yaml --- @@ -242,6 +344,7 @@ metadata: namespace: backup-test spec: backupMode: log + logSubcommand: log-stop br: cluster: demo1 clusterNamespace: test1 @@ -266,12 +369,14 @@ demo1-log-backup-gcs log Stopped .... ``` -你也可以采用和启动日志备份时相同的方法来停止日志备份,已经被创建过的 `Backup` CR 会因此被更新。 +Stopped 是日志备份的终止状态,此状态下无法再次更改状态,但你仍然可以清理日志备份的数据。 + +在 v1.5.4/v1.6.0 及更早版本的 TiDB Operator 中,可以使用 logStop: true/false 字段来停止或启动任务。此字段为了向后兼容而保留。 #### 清理日志备份数据 -1. 由于你在开启日志备份的时候已经创建了名为 `demo1-log-backup-gcs` 的 `Backup` CR,因此可以直接更新该 `Backup` CR 的配置,来激活清理日志备份数据的操作。操作激活优先级从高到低分别是停止日志备份任务、删除日志备份数据和开启日志备份任务。执行如下操作来清理 2022-10-10T15:21:00+08:00 之前的所有日志备份数据。 +1. 由于你在开启日志备份的时候已经创建了名为 `demo1-log-backup-gcs` 的 `Backup` CR,因此可以直接更新该 `Backup` CR 的配置,来激活清理日志备份数据的操作。执行如下操作来清理 2022-10-10T15:21:00+08:00 之前的所有日志备份数据。 ```shell kubectl edit backup demo1-log-backup-gcs -n backup-test @@ -288,6 +393,7 @@ demo1-log-backup-gcs log Stopped .... namespace: backup-test spec: backupMode: log + logSubcommand: log-start/log-pause/log-stop br: cluster: demo1 clusterNamespace: test1 diff --git a/zh/deploy-tidb-from-kubernetes-gke.md b/zh/deploy-tidb-from-kubernetes-gke.md index aea07110c..104509ed1 100644 --- a/zh/deploy-tidb-from-kubernetes-gke.md +++ b/zh/deploy-tidb-from-kubernetes-gke.md @@ -8,7 +8,9 @@ aliases: ['/docs-cn/tidb-in-kubernetes/dev/deploy-tidb-from-kubernetes-gke/'] 本文介绍如何使用 [TiDB Operator](https://github.com/pingcap/tidb-operator) 在 Google Cloud 上部署 TiDB 集群。本教程需要在 [Google Cloud Shell](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/pingcap/docs-tidb-operator&tutorial=zh/deploy-tidb-from-kubernetes-gke.md) 上运行。 - + + Google Cloud Shell + 所包含的步骤如下: