Deploy TiDB Environment According to K8S Installation Steps, Error Occurs When Adding TiFlash

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

Original topic: 根据K8S安装步骤部署好TiDB环境,增加TiFlash出错

| username: api915

[Test Environment] Testing environment
[TiDB Version] V6.1.0
Error when executing the statement:
mysql> ALTER DATABASE test SET TIFLASH REPLICA 2;
1105 - the tiflash replica count: 2 should be less than the total tiflash server count: 0

Configuration information:


Tiflash status:

According to the documentation, edit the configuration using kubectl edit tc basic -n tidb-cluster, save and exit. Is there anything else that needs to be done?

| username: songxuecheng | Original post link

Check the logs of the TiFlash pod.

| username: wuxiangdong | Original post link

First, check TiFlash, and use describe to take a look.

| username: zhouzeru | Original post link

Describe the container and see if there are any prompts.

| username: zhouzeru | Original post link

kubectl describe pod basic-tikv-0 -n xxx
| username: api915 | Original post link

| username: api915 | Original post link

How should the PVC configuration be modified?

| username: TiDBer_CEVsub | Original post link

You can try scaling down first, then scaling up.

| username: 数据小黑 | Original post link

It might be an issue with the limit configuration, similar to what I have encountered before.
Refer to this document to see if it can solve your problem: 专栏 - tiflash 6.0 on K8s 扩容与新特性实践 | TiDB 社区

| username: songxuecheng | Original post link

Check if there are PV and PVC or if there are no available PVC bindings.

| username: api915 | Original post link

Check if there are PV and PVC or if there are no available PVC bindings?
How do I check this?

| username: songxuecheng | Original post link

kubectl get pvc -A
kubectl get pv -n xx
| username: api915 | Original post link

Do I need to add this to the volumes configuration? How should I configure it?