forked from pingcap/docs-tidb-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
en: update doc for tiflash (pingcap#272)
- Loading branch information
Showing
6 changed files
with
181 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
title: Deploy TiFlash on Kubernetes | ||
summary: Learn how to deploy TiFlash on Kubernetes. | ||
category: how-to | ||
--- | ||
|
||
# Deploy TiFlash on Kubernetes | ||
|
||
This document describes how to deploy TiFlash on Kubernetes. | ||
|
||
## Prerequisites | ||
|
||
* [Deploy TiDB Operator](deploy-tidb-operator.md). | ||
|
||
## Fresh TiFlash deployment | ||
|
||
To deploy TiFlash when deploying the TiDB cluster, refer to [Deploy TiDB on General Kubernetes](deploy-on-general-kubernetes.md). | ||
|
||
## Add TiFlash component to an existing TiDB cluster | ||
|
||
Edit TidbCluster Custom Resource: | ||
|
||
{{< copyable "shell-regular" >}} | ||
|
||
``` shell | ||
kubectl eidt tc ${cluster_name} -n ${namespace} | ||
``` | ||
|
||
Add the TiFlash configuration as follows: | ||
|
||
```yaml | ||
spec: | ||
tiflash: | ||
baseImage: pingcap/tiflash | ||
maxFailoverCount: 3 | ||
replicas: 1 | ||
storageClaims: | ||
- resources: | ||
requests: | ||
storage: 100Gi | ||
storageClassName: local-storage | ||
``` | ||
TiFlash supports mounting multiple Persistent Volumes (PVs). If you want to configure multiple PVs for TiFlash, configure multiple `resources` in `tiflash.storageClaims`, each `resources` with a separate `storage request` and `storageClassName`. For example: | ||
|
||
```yaml | ||
tiflash: | ||
baseImage: pingcap/tiflash | ||
maxFailoverCount: 3 | ||
replicas: 1 | ||
storageClaims: | ||
- resources: | ||
requests: | ||
storage: 100Gi | ||
storageClassName: local-storage | ||
- resources: | ||
requests: | ||
storage: 100Gi | ||
storageClassName: local-storage | ||
``` | ||
|
||
To [add TiFlash component to an existing TiDB cluster](https://pingcap.com/docs/stable/tiflash/deploy-tiflash/#add-tiflash-component-to-an-existing-tidb-cluster), `replication.enable-placement-rules` should be set to `true` in PD. After you add the TiFlash configuration in TidbCluster by taking the above steps, TiDB Operator will automatically configure `replication.enable-placement-rules: "true"` in PD. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters