tidb-operator icon indicating copy to clipboard operation
tidb-operator copied to clipboard

TidbInitializer pod status stuck at Init 0/1

Open daicheng123 opened this issue 3 years ago • 2 comments

kubectl get po -n tidb-cluster

NAME READY STATUS RESTARTS AGE basic-discovery-785f8dc869-btq9j 1/1 Running 0 89m basic-monitor-0 3/3 Running 0 55m basic-pd-0 1/1 Running 0 89m basic-pump-0 1/1 Running 0 88m basic-ticdc-0 1/1 Running 0 88m basic-tidb-0 1/2 Running 0 88m basic-tidb-1 1/2 Running 0 82m basic-tidb-initializer-wzgqn 0/1 Init:0/1 0 13m basic-tiflash-0 4/4 Running 0 89m basic-tikv-0 1/1 Running 0 88m

kubectl logs -f basic-tidb-initializer-wzgqn -n tidb-cluster

Error from server (BadRequest): container "mysql-client" in pod "basic-tidb-initializer-wzgqn" is waiting to start: PodInitializing

daicheng123 avatar Jan 16 '22 13:01 daicheng123

Could you please provide the logs of init container by exec the cmd kubectl logs basic-tidb-initializer-wzgqn -n tidb-cluster -c wait?

KanShiori avatar Jan 17 '22 08:01 KanShiori

basic-tidb-0 1/2 Running 0 88m basic-tidb-1 1/2 Running 0 82m

This is because the tidb pod is not ready yet, the initializer will execute after the tidb ready.

mikechengwei avatar Jan 19 '22 15:01 mikechengwei