TiDB and TiCDC components did not create PV

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: tidb、ticdc组件没有创建pv

| username: liyuntang

[TiDB Usage Environment] Test Environment
[TiDB Version] v7.1.0. Operator version is 1.4.6
[Reproduction Path] Create a TiDB cluster in a k8s environment using tc resources
[Encountered Issues: Problem Phenomenon and Impact]
Phenomenon:
After the TiDB cluster is successfully created, the TiDB and TiCDC components do not create corresponding PV resources, while other components create PV resources normally.
Issues:

  1. Why did the TiDB and TiCDC components not create corresponding PV resources?
  2. Where is the data of TiDB and TiCDC stored?

[Resource Configuration]
Cluster pod information:

Cluster PV resource information:

By checking the PV information, we found that TiDB and TiCDC did not create corresponding PVs.

Core component configuration is as follows:

| username: tidb狂热爱好者 | Original post link

TiDB TiCDC does not require persistence.

| username: yiduoyunQ | Original post link

TiDB has no data, or the data is in memory.
TiCDC has no data, metadata is in PD, sort is in memory, and disk can be used.

Reference: 配置 TiDB 集群 | PingCAP 文档中心

| username: liyuntang | Original post link

According to the official website’s example configuration, the operator reports an error:
E0523 11:27:15.528905 1 tidb_cluster_controller.go:142] TidbCluster: f239fb99-2438-485c-ad15-948e728ea72c/basic, sync failed contains volumeMounts that do not have matched volume: map[ticdc-data:{ticdc-data false /ticdc/data } ticdc-log:{ticdc-log false /ticdc/log }], requeuing
I0523 11:27:15.529351 1 event.go:282] Event(v1.ObjectReference{Kind:“TidbCluster”, Namespace:“f239fb99-2438-485c-ad15-948e728ea72c”, Name:“basic”, UID:“27998d96-2df3-401e-b855-123e418ea6ca”, APIVersion:“pingcap.com/v1alpha1”, ResourceVersion:“674010469”, FieldPath:“”}): type: ‘Warning’ reason: ‘FailedUpdateTiCDCSTS’ contains volumeMounts that do not have matched volume: map[ticdc-data:{ticdc-data false /ticdc/data } ticdc-log:{ticdc-log false /ticdc/log }]

| username: zhaokede | Original post link

Only the configuration file

| username: yiduoyunQ | Original post link

The image you provided is not visible. Please provide the text you need translated.

| username: liyuntang | Original post link

Understood, thank you.

| username: 小龙虾爱大龙虾 | Original post link

If there is no need for persistent data, then there is no need for PV.

| username: YuchongXU | Original post link

Only the configuration file

| username: Jack-li | Original post link

PV is not mandatory to create.

| username: TIDB-Learner | Original post link

TiKV persists data, while other components do not need to persist data. Even metadata is stored in TiKV. Locally, at most, there is some caching (in memory).

| username: yytest | Original post link

  • Deployment Configuration Issues: First, check your Helm Chart configuration or TiDB Operator configuration to ensure that you have correctly configured the storage-related settings for TiDB and TiCDC components. For example, make sure the values.yaml file has the corresponding PVC configuration and that it is not commented out or misconfigured.
  • Storage Class Issues: Ensure that there is an available StorageClass in your Kubernetes cluster and that your PVC configuration matches it. If the StorageClass configuration is incorrect or does not exist, the PVC will not be able to bind to the PV, resulting in the inability to create PV resources.
  • Resource Quota and Permission Issues: Check if there are sufficient resource quotas to create new PVs and whether your service account has the permissions to create PVs and PVCs in the Kubernetes cluster.
  • TiDB Operator Version Compatibility: Although you are using TiDB Operator version 1.4.6, which is theoretically compatible with TiDB v7.1.0, it is still recommended to check the official documentation or compatibility matrix to ensure there are no known issues.
  • TiDB Component Configuration: In some cases, TiDB and TiCDC components may be configured to use in-memory storage or not require persistent storage. This configuration is uncommon in production environments but may be set this way in testing environments for simplification.
| username: liyuntang | Original post link

OK, thank you.