TiDB Deployment Failed on Kubernetes

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

Original topic: TiDB在K8s上面部署失败

| username: TiDBer_co40L0hl

[TiDB Usage Environment] Production Environment / Testing / Poc
[TiDB Version]
[Reproduction Path] What operations were performed when the issue occurred
[Encountered Issue: Issue Phenomenon and Impact]
[Resource Configuration] Enter TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
[Attachment: Screenshot/Logs/Monitoring]
helm install tidb-operator pingcap/tidb-operator --version v1.5.2
After that
Issue 1: When installing TiDB, it shows
[root@host11 tidb]# kubectl describe pod tidb-scheduler-6f88fff6f8-8fwvg
tidb-scheduler-6f88fff6f8-8fwvg 1/2 CrashLoopBackOff 13 (17s ago) 41m
Check k8s description
Type Reason Age From Message

Normal Scheduled 43m default-scheduler Successfully assigned default/tidb-scheduler-6f88fff6f8-8fwvg to host13
Normal Pulled 43m kubelet Container image “pingcap/tidb-operator:v1.5.2” already present on machine
Normal Created 43m kubelet Created container tidb-scheduler
Normal Started 43m kubelet Started container tidb-scheduler
Normal Pulled 42m (x5 over 43m) kubelet Container image “registry.k8s.io/kube-scheduler:v1.28.2” already present on machine
Normal Created 42m (x5 over 43m) kubelet Created container kube-scheduler
Normal Started 42m (x5 over 43m) kubelet Started container kube-scheduler
Warning BackOff 3m28s (x185 over 43m) kubelet Back-off restarting failed container kube-scheduler in pod tidb-scheduler-6f88fff6f8-8fwvg_default(be17373b-22ee-4f72-831f-32e86cf2be93)

[root@host11 tidb]# kubectl logs tidb-scheduler-6f88fff6f8-8fwvg
Defaulted container “tidb-scheduler” out of: tidb-scheduler, kube-scheduler
I0309 12:05:40.269092 1 version.go:38] Welcome to TiDB Operator.
I0309 12:05:40.269145 1 version.go:39] TiDB Operator Version: version.Info{GitVersion:“v1.5.2”, GitCommit:“456a0273f67ac61212da78956f49f0a4a07e21d8”, GitTreeState:“clean”, BuildDate:“2024-01-19T03:51:13Z”, GoVersion:“go1.21.5”, Compiler:“gc”, Platform:“linux/amd64”}
I0309 12:05:40.269172 1 main.go:64] FLAG: --V=“false”
I0309 12:05:40.269175 1 main.go:64] FLAG: --add_dir_header=“false”
I0309 12:05:40.269177 1 main.go:64] FLAG: --alsologtostderr=“false”
I0309 12:05:40.269178 1 main.go:64] FLAG: --features=“AdvancedStatefulSet=false,AutoScaling=false,StableScheduling=true,VolumeModifying=false,VolumeReplacing=false”
I0309 12:05:40.269184 1 main.go:64] FLAG: --log_backtrace_at=“:0”
I0309 12:05:40.269189 1 main.go:64] FLAG: --log_dir=“”
I0309 12:05:40.269191 1 main.go:64] FLAG: --log_file=“”
I0309 12:05:40.269192 1 main.go:64] FLAG: --log_file_max_size=“1800”
I0309 12:05:40.269194 1 main.go:64] FLAG: --logtostderr=“true”
I0309 12:05:40.269196 1 main.go:64] FLAG: --one_output=“false”
I0309 12:05:40.269197 1 main.go:64] FLAG: --port=“10262”
I0309 12:05:40.269198 1 main.go:64] FLAG: --skip_headers=“false”
I0309 12:05:40.269201 1 main.go:64] FLAG: --skip_log_headers=“false”
I0309 12:05:40.269202 1 main.go:64] FLAG: --stderrthreshold=“2”
I0309 12:05:40.269204 1 main.go:64] FLAG: --v=“2”
I0309 12:05:40.269207 1 main.go:64] FLAG: --version=“false”
I0309 12:05:40.269208 1 main.go:64] FLAG: --vmodule=“”
I0309 12:05:40.269859 1 mux.go:66] start scheduler extender server, listening on

So strange

| username: zhanggame1 | Original post link

No anomalies found in the logs.

| username: 小于同学 | Original post link

The machine address is not configured, right?

| username: redgame | Original post link

What is the operation process?

| username: TiDBer_aaO4sU46 | Original post link

Even if you can install it, how do you use it… Sigh.

| username: yiduoyunQ | Original post link

The historical burden from the 1.1 period, when the k8s scheduler was not mature enough.
Starting from the 1.2 period (at this time k8s was already > v1.19), there was no need to use tidb-scheduler anymore, but it was still retained by default for compatibility with some k8s < v1.19 users.
From 1.6 onwards, tidb-scheduler will be disabled by default chart: do not deploy tidb-scheduler by default by csuzhangxc · Pull Request #5458 · pingcap/tidb-operator · GitHub

Additionally, tidb-scheduler will not affect the installation and deployment of tidb-cluster, so you can continue to operate.

| username: tidb菜鸟一只 | Original post link

Which step exactly are you having trouble with? Your logs seem fine…

| username: dba远航 | Original post link

Is the issue related to an abnormal IP address?

| username: Miracle | Original post link

Are you referring to the tidb-scheduler not being able to start, or something else?

| username: TiDBer_co40L0hl | Original post link

Thank you for your answer :blush:

| username: TiDBer_co40L0hl | Original post link

Under normal circumstances, shouldn’t tidb-scheduler start up properly?

| username: TiDBer_co40L0hl | Original post link

Yes, it doesn’t feel right that it didn’t start up properly.

| username: Miracle | Original post link

Did the pod crash?