Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
320070c
commit d51704c
Showing
6 changed files
with
177 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: 在 Kubernetes 上部署 TiFlash | ||
summary: 了解如何在 Kubernetes 上部署 TiFlash。 | ||
category: how-to | ||
--- | ||
|
||
# 在 Kubernetes 上部署 TiFlash | ||
|
||
本文介绍如何在 Kubernetes 上部署 TiFlash。 | ||
|
||
## 前置条件 | ||
|
||
* TiDB Operator [部署](deploy-tidb-operator.md)完成。 | ||
|
||
## 全新部署 TiDB 集群同时部署 TiFlash | ||
|
||
参考 [在标准 Kubernetes 上部署 TiDB 集群](deploy-on-general-kubernetes.md)进行部署。 | ||
|
||
## 在现有 TiDB 集群上新增 TiFlash 组件 | ||
|
||
编辑 TidbCluster Custom Resource: | ||
|
||
{{< copyable "shell-regular" >}} | ||
|
||
``` shell | ||
kubectl eidt tc ${cluster_name} -n ${namespace} | ||
``` | ||
|
||
按照如下示例增加 TiFlash 配置: | ||
|
||
```yaml | ||
spec: | ||
tiflash: | ||
baseImage: pingcap/tiflash | ||
maxFailoverCount: 3 | ||
replicas: 1 | ||
storageClaims: | ||
- resources: | ||
requests: | ||
storage: 100Gi | ||
storageClassName: local-storage | ||
``` | ||
|
||
TiFlash 支持挂载多个 PV,如果要为 TiFlash 配置多个 PV,可以在 `tiflash.storageClaims` 下面配置多项,每一项可以分别配置 `storage reqeust` 和 `storageClassName`,例如: | ||
|
||
```yaml | ||
tiflash: | ||
baseImage: pingcap/tiflash | ||
maxFailoverCount: 3 | ||
replicas: 1 | ||
storageClaims: | ||
- resources: | ||
requests: | ||
storage: 100Gi | ||
storageClassName: local-storage | ||
- resources: | ||
requests: | ||
storage: 100Gi | ||
storageClassName: local-storage | ||
``` | ||
|
||
[新增部署 TiFlash](https://pingcap.com/docs-cn/stable/reference/tiflash/deploy/#%E5%9C%A8%E5%8E%9F%E6%9C%89-tidb-%E9%9B%86%E7%BE%A4%E4%B8%8A%E6%96%B0%E5%A2%9E-tiflash-%E7%BB%84%E4%BB%B6) 需要 PD 配置 `replication.enable-placement-rules: "true"`,通过上述步骤在 TidbCluster 中增加 TiFlash 配置后,TiDB Operator 会自动为 PD 配置 `replication.enable-placement-rules: "true"`。 |
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