No pod after deploying TiDB with TiDB Operator

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

Original topic: TiDB Operator 部署tidb后没有pod

| username: Jaimyjie

After executing kubectl apply -f tidbcluster01 -n tidbcluster01ns, the pods are empty when checked. Where can I view the logs? Did I miss any steps?

[root@k8smaster01 ~]# kubectl get po -n tidbcluster01ns -l app.kubernetes.io/instance=tidbcluster01
No resources found in tidbcluster01ns namespace.
| username: ffeenn | Original post link

Is the namespace correct? You have nothing here, it shouldn’t be like this.

| username: Jaimyjie | Original post link

Yes, there were no errors during the deployment execution.
Re-execution prompt:

[root@k8smaster01 ~]# pwd
/root
[root@k8smaster01 ~]# ll tidbcluster01/
total 40
-rw-r--r--. 1 root root 37890 Mar 10 19:33 tidb-cluster.yaml
[root@k8smaster01 ~]# kubectl apply -f tidbcluster01 -n tidbcluster01ns
tidbcluster.pingcap.com/tidbcluster01 unchanged
| username: yiduoyunQ | Original post link

Check it yourself first.

| username: Jaimyjie | Original post link

Is it related to my k8s environment? I’m using 1.26.1 and containerd, not docker.

| username: ffeenn | Original post link

Try completing the command with the file after apply -f, and then try again. It didn’t take effect for you.

| username: ffeenn | Original post link

According to this document, 1. First, create a store. 2. Then create an RCD. 3. Create a TiDB Operator. 4. Create a TiDB cluster. Refer to the documentation:
TiDB on Kubernetes User Documentation | PingCAP Documentation Center

Deploy TiDB Cluster on Standard Kubernetes | PingCAP Documentation Center

| username: h5n1 | Original post link

Is it a test environment? Check if there are any errors in the TiDB control manager. I encountered the same issue before and resolved it by restarting the host.

| username: liuis | Original post link

Take a look at whether the NS is correct.

| username: 清风明月 | Original post link

I have encountered a situation where the namespace is hardcoded in the YAML file, so there is no need to specify it during apply. Also, the YAML file for creating the cluster does not have config configurations for each service component. Without the config configurations, the corresponding secret files cannot be generated, and the pods cannot be created. Can you share the YAML file you used to create the cluster?

| username: liuis | Original post link

This kind of error can be seen from the description. Installing k8s is relatively convenient~