Skip to content

Commit

Permalink
en: update toc and reorganize some v1.1 content (pingcap#59)
Browse files Browse the repository at this point in the history
* en: overall update for v1.1

* update

* Update tidb-cluster-chart-config.md

* Update TOC.md

* minor update

* en: address comments

* en: update notes link

Co-authored-by: lilin90 <[email protected]>
  • Loading branch information
ran-huang and lilin90 authored Mar 31, 2020
1 parent 86ff17c commit 4d84409
Show file tree
Hide file tree
Showing 10 changed files with 232 additions and 208 deletions.
29 changes: 16 additions & 13 deletions en/TOC.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,33 +20,36 @@
- [Access TiDB in Kubernetes](access-tidb.md)
- [Deploy TiDB Binlog](deploy-tidb-binlog.md)
+ Configure
- [Initialize a Cluster](initialize-a-cluster.md)
- [Configure TiDB Using Helm](configure-a-tidb-cluster.md)
- [Configure TiDB Using TidbCluster](configure-cluster-using-tidbcluster.md)
- [Configure Backup](configure-backup.md)
- [Configure Storage Class](configure-storage-class.md)
- [Configure Resource and Disaster Recovery](configure-a-tidb-cluster.md)
- [Initialize a Cluster](initialize-a-cluster.md)
- [Configure a TiDB Cluster using TidbCluster](configure-cluster-using-tidbcluster.md)
- [Configure tidb-drainer Chart](configure-tidb-binlog-drainer.md)
- Monitor
- [Configure tidb-cluster Chart](tidb-cluster-chart-config.md)
- [Configure tidb-backup Chart](configure-backup.md)
+ Monitor
- [Monitor TiDB Using Helm](monitor-a-tidb-cluster.md)
- [Monitor TiDB Using TidbMonitor](monitor-using-tidbmonitor.md)
+ Maintain
- [Destroy a TiDB cluster](destroy-a-tidb-cluster.md)
- [Restart a TiDB Cluster](restart-a-tidb-cluster.md)
- [Maintain a Hosting Kubernetes Node](maintain-a-kubernetes-node.md)
+ Backup and Restore
- [Use Helm Charts](backup-and-restore-using-helm-charts.md)
+ Use CRDs
- [Back up Data to GCS](backup-to-gcs.md)
- [Restore Data from GCS](restore-from-gcs.md)
- [Back up Data to S3-Compatible Storage](backup-to-s3.md)
- [Restore Data from S3-Compatible Storage](restore-from-s3.md)
- [Restore Data with TiDB Lightning](restore-data-using-tidb-lightning.md)
- [Collect TiDB Logs](collect-tidb-logs.md)
- [Enable Automatic Failover](use-auto-failover.md)
- [Enable Admission Controller](enable-admission-webhook.md)
+ Scale
- [Scale](scale-a-tidb-cluster.md)
- [Enable Auto-scaling](enable-tidb-cluster-auto-scaling.md)
+ Backup and Restore
- [Use Helm Charts](backup-and-restore-using-helm-charts.md)
+ Use CRDs
- [Back up Data to GCS](backup-to-gcs.md)
- [Restore Data from GCS](restore-from-gcs.md)
- [Back up Data to S3-Compatible Storage Using Mydumper](backup-to-s3.md)
- [Restore Data from S3-Compatible Storage Using Loader](restore-from-s3.md)
- [Back up Data to S3-Compatible Storage Using BR](backup-to-aws-s3-using-br.md)
- [Restore Data from S3-Compatible Storage Using BR](restore-from-aws-s3-using-br.md)
- [Restore Data Using TiDB Lightning](restore-data-using-tidb-lightning.md)
+ Upgrade
- [TiDB Cluster](upgrade-a-tidb-cluster.md)
- [TiDB Operator](upgrade-tidb-operator.md)
Expand Down
34 changes: 12 additions & 22 deletions en/access-tidb.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,20 @@ category: how-to

This document describes how to access the TiDB cluster in Kubernetes.

+ To access the TiDB cluster within a Kubernetes cluster, use the TiDB service domain name `<release-name>-tidb.<namespace>`.
+ To access the TiDB cluster outside a Kubernetes cluster, expose the TiDB service port by editing the `tidb.service` field configuration in the `values.yaml` file of the `tidb-cluster` Helm chart.
+ To access the TiDB cluster within a Kubernetes cluster, use the TiDB service domain name `<cluster-name>-tidb.<namespace>`.
+ To access the TiDB cluster outside a Kubernetes cluster, expose the TiDB service port by editing the `spec.tidb.service` field configuration in the `TidbCluster` CR.

{{< copyable "" >}}

```yaml
tidb:
service:
type: NodePort
# externalTrafficPolicy: Cluster
# annotations:
# cloud.google.com/load-balancer-type: Internal
spec:
...
tidb:
service:
type: NodePort
# externalTrafficPolicy: Cluster
# annotations:
# cloud.google.com/load-balancer-type: Internal
```

## NodePort
Expand All @@ -45,19 +47,7 @@ To view the Node Port assigned by Service, run the following commands to obtain
{{< copyable "shell-regular" >}}

```shell
namespace=<your-tidb-namesapce>
```

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

```shell
release=<your-tidb-release-name>
```

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

```shell
kubectl -n <namespace> get svc <release-name>-tidb -ojsonpath="{.spec.ports[?(@.name=='mysql-client')].nodePort}{'\n'}"
kubectl -n <namespace> get svc <cluster-name>-tidb -ojsonpath="{.spec.ports[?(@.name=='mysql-client')].nodePort}{'\n'}"
```

To check you can access TiDB services by using the IP of what nodes, see the following two cases:
Expand All @@ -68,7 +58,7 @@ To check you can access TiDB services by using the IP of what nodes, see the fol
{{< copyable "shell-regular" >}}

```shell
kubectl -n <namespace> get pods -l "app.kubernetes.io/component=tidb,app.kubernetes.io/instance=<release-name>" -ojsonpath="{range .items[*]}{.spec.nodeName}{'\n'}{end}"
kubectl -n <namespace> get pods -l "app.kubernetes.io/component=tidb,app.kubernetes.io/instance=<cluster-name>" -ojsonpath="{range .items[*]}{.spec.nodeName}{'\n'}{end}"
```

## LoadBalancer
Expand Down
16 changes: 10 additions & 6 deletions en/backup-and-restore-using-helm-charts.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ aliases: ['/docs/dev/tidb-in-kubernetes/maintain/backup-and-restore/','/docs/v3.

This document describes how to back up and restore the data of a TiDB cluster in Kubernetes using Helm charts.

For TiDB Operator 1.1 or later versions, it is recommended that you use the backup and restoration methods based on CustomResourceDefinition (CRD). Refer to the following documents for details:

* [Back up Data to GCS](backup-to-gcs.md)
* [Restore Data from GCS](restore-from-gcs.md)
* [Back up Data to S3-Compatible Storage](backup-to-s3.md)
* [Restore Data from S3-Compatible Storage](restore-from-s3.md)
For TiDB Operator 1.1 or later versions, it is recommended that you use the backup and restoration methods based on CustomResourceDefinition (CRD).

+ If the TiDB cluster version < v3.1, refer to the following documents:
- [Back up Data to GCS](backup-to-gcs.md)
- [Restore Data from GCS](restore-from-gcs.md)
- [Back up Data to S3-Compatible Storage Using Mydumper](backup-to-s3.md)
- [Restore Data from S3-Compatible Storage Using Loader](restore-from-s3.md)
+ If the TiDB cluster version >= v3.1, refer to the following documents:
- [Back up Data to S3-Compatible Storage Using BR](backup-to-aws-s3-using-br.md)
- [Restore Data from S3-Compatible Storage Using BR](restore-from-aws-s3-using-br.md)

TiDB in Kubernetes supports two backup strategies using Helm charts:

Expand Down
Loading

0 comments on commit 4d84409

Please sign in to comment.