From fea0223d6c6bb34e1b0ce360c34252d00af387af Mon Sep 17 00:00:00 2001 From: DanielZhangQD <36026334+DanielZhangQD@users.noreply.github.com> Date: Thu, 17 Dec 2020 20:24:24 +0800 Subject: [PATCH 1/2] remove procedure about monitoring multiple clusters (#932) --- en/monitor-using-tidbmonitor.md | 38 --------------------------------- zh/monitor-using-tidbmonitor.md | 38 --------------------------------- 2 files changed, 76 deletions(-) diff --git a/en/monitor-using-tidbmonitor.md b/en/monitor-using-tidbmonitor.md index aefa6e12b9..9a19846351 100644 --- a/en/monitor-using-tidbmonitor.md +++ b/en/monitor-using-tidbmonitor.md @@ -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). diff --git a/zh/monitor-using-tidbmonitor.md b/zh/monitor-using-tidbmonitor.md index 9358f8a04d..b146a055c4 100644 --- a/zh/monitor-using-tidbmonitor.md +++ b/zh/monitor-using-tidbmonitor.md @@ -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)。 From a7d04a97faac173a84dbd9408446ddb8631917dc Mon Sep 17 00:00:00 2001 From: Ran Date: Fri, 18 Dec 2020 10:38:56 +0800 Subject: [PATCH 2/2] en: fix storageVolumes config (#931) Signed-off-by: Ran --- en/configure-a-tidb-cluster.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/en/configure-a-tidb-cluster.md b/en/configure-a-tidb-cluster.md index 986c1db116..552bde9bf5 100644 --- a/en/configure-a-tidb-cluster.md +++ b/en/configure-a-tidb-cluster.md @@ -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 @@ -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 @@ -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.