Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: 用podman启动tidb集群,不知道怎么修改默认的tikv名称

[TiDB Usage Environment] Production Environment
[TiDB Version] v7.1.0
[Reproduction Path] Operations performed that led to the issue
Started the TiDB cluster using podman with the command podman play kube
[Encountered Issue: Phenomenon and Impact]
After starting with podman, the container name automatically includes the pod’s name. For example, if the pod name is tidb, the tikv0 container name becomes tidb-tikv0. However, when TiDB uses TiKV for storage, it defaults to the RPC address tikv0:20160, resulting in a host not found error. Is there a way to change the TiKV name from tikv0 to tidb-tikv0? I couldn’t find this option in the TiDB toml configuration.
[Resource Configuration]
version: ‘2.1’
kind: Pod
metadata:
labels:
app: tidb
name: tidb
spec:
containers:
- args:
image: pingcap/tikv:v7.1.0
name: tikv0
…
[Attachments: Screenshots/Logs/Monitoring]
[2023/07/18 08:09:16.188 +00:00] [INFO] [region_cache.go:2786] [“[health check] check health error”] [store=tikv2:20160] [error=“rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp: lookup tikv2 on 10.0.2.3:53: no such host"”]
[2023/07/18 08:09:16.302 +00:00] [INFO] [region_cache.go:2786] [“[health check] check health error”] [store=tikv0:20160] [error=“rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp: lookup tikv0 on 10.0.2.3:53: no such host"”]