Skip to content

Commit

Permalink
Merge branch 'master' into improveImportDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
BinChen authored Dec 18, 2020
2 parents af105ca + a7d04a9 commit 23d84e8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 80 deletions.
12 changes: 8 additions & 4 deletions en/configure-a-tidb-cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ For example:
config:
log:
file:
name: /var/log/pd
filename: /var/log/pdlog/pd.log
level: "warn"
storageVolumes:
- name: log
storageSize: "2Gi"
mountPath: "/var/log/pd"
mountPath: "/var/log/pdlog"
tidb:
baseImage: pingcap/tidb
replicas: 1
Expand All @@ -121,12 +121,12 @@ For example:
config:
log:
file:
name: /var/log/tidb
filename: /var/log/tidblog/tidb.log
level: "warn"
storageVolumes:
- name: log
storageSize: "2Gi"
mountPath: "/var/log/tidb"
mountPath: "/var/log/tidblog"
tikv:
baseImage: pingcap/tikv
replicas: 1
Expand All @@ -151,6 +151,10 @@ For example:
mountPath: "/data_sbj/titan/data"
```
> **Note:**
>
> TiDB Operator uses some mount paths by default. For example, it mounts `EmptyDir` to the `/var/log/tidb` directory for the TiDB Pod. Therefore, avoid duplicate `mountPath` when you configure `storageVolumes`.

### mountClusterClientSecret

It is recommended that you configure `spec.pd.mountClusterClientSecret: true` and `spec.tikv.mountClusterClientSecret: true`, so that TiDB Operator can mount the `${cluster_name}-cluster-client-secret` certificates to the PD and TiKV containers automatically, which can make the [use of `pd-ctl` and `tikv-ctl`](enable-tls-between-components.md#configure-pd-ctl-tikv-ctl-and-connect-to-the-cluster) easier.
Expand Down
38 changes: 0 additions & 38 deletions en/monitor-using-tidbmonitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,44 +296,6 @@ In a public cloud-deployed Kubernetes cluster, you can usually [configure Loadba
curl -H "Host: example.com" ${node_ip}:${NodePort}
```

## Monitor multiple TiDB clusters

TidbMonitor supports monitoring multiple non-TLS clusters. As for TLS-enabled clusters, it is recommended that you monitor each cluster with a separate TidbMonitor. You can use [`Thanos`](https://thanos.io/tip/thanos/getting-started.md/) to query all the monitoring data.

To monitor multiple non-TLS clusters, configure the TidbMonitor CR as follows:

```yaml
apiVersion: pingcap.com/v1alpha1
kind: TidbMonitor
metadata:
name: basic
spec:
clusters:
- name: ns1
namespace: ns1
- name: ns2
namespace: ns2
kubePrometheusURL: "your-kube-prometheus-url"
alertmanagerURL: "your-alert-manager-url"
prometheus:
baseImage: prom/prometheus
version: v2.18.1
service:
type: NodePort
grafana:
baseImage: grafana/grafana
version: 6.1.6
service:
type: NodePort
initializer:
baseImage: pingcap/tidb-monitor-initializer
version: v4.0.6
reloader:
baseImage: pingcap/tidb-monitor-reloader
version: v1.0.1
imagePullPolicy: IfNotPresent
```

## References

For more detailed API information of TidbMonitor, see [TiDB Operator API documentation](https://github.com/pingcap/tidb-operator/blob/master/docs/api-references/docs.md).
38 changes: 0 additions & 38 deletions zh/monitor-using-tidbmonitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,44 +277,6 @@ type: kubernetes.io/tls
curl -H "Host: example.com" ${node_ip}:${NodePort}
```

## 监控多集群

TidbMonitor 支持监控多个非 TLS 集群。对于 TLS 集群,建议每个集群使用一个单独的 TidbMonitor 来监控,推荐使用 [`Thanos`](https://thanos.io/tip/thanos/getting-started.md/) 方案统一查询监控数据。

监控多个非 TLS 集群示例:

```yaml
apiVersion: pingcap.com/v1alpha1
kind: TidbMonitor
metadata:
name: basic
spec:
clusters:
- name: ns1
namespace: ns1
- name: ns2
namespace: ns2
kubePrometheusURL: "your-kube-prometheus-url"
alertmanagerURL: "your-alert-manager-url"
prometheus:
baseImage: prom/prometheus
version: v2.18.1
service:
type: NodePort
grafana:
baseImage: grafana/grafana
version: 6.1.6
service:
type: NodePort
initializer:
baseImage: pingcap/tidb-monitor-initializer
version: v4.0.8
reloader:
baseImage: pingcap/tidb-monitor-reloader
version: v1.0.1
imagePullPolicy: IfNotPresent
```

## 参考

了解 TidbMonitor 更为详细的 API 设置,可以参考 [API 文档](https://github.com/pingcap/tidb-operator/blob/master/docs/api-references/docs.md)。

0 comments on commit 23d84e8

Please sign in to comment.