No resources found in tidb-cluster namespace

使用k8s创建tidb,根据官网提供的步骤,通过tidb-operator进行操作,前期步骤没有报异常,但是最后部署tidb的时候没有启动POD
[root@hadoop01 tidb-operator]# kubectl get pods -n tidb-cluster
No resources found in tidb-cluster namespace.

K8S的版本
[root@hadoop01 tidb-operator]# kubectl version
Client Version: version.Info{Major:“1”, Minor:“16”, GitVersion:“v1.16.9”, GitCommit:“a17149e1a189050796ced469dbd78d380f2ed5ef”, GitTreeState:“clean”, BuildDate:“2020-04-16T11:44:51Z”, GoVersion:“go1.13.9”, Compiler:“gc”, Platform:“linux/amd64”}
Server Version: version.Info{Major:“1”, Minor:“16”, GitVersion:“v1.16.9”, GitCommit:“a17149e1a189050796ced469dbd78d380f2ed5ef”, GitTreeState:“clean”, BuildDate:“2020-04-16T11:36:15Z”, GoVersion:“go1.13.9”, Compiler:“gc”, Platform:“linux/amd64”}

[root@hadoop01 tidb-operator]# kubectl get tidbclusters -n tidb-cluster basic
NAME READY PD STORAGE READY DESIRE TIKV STORAGE READY DESIRE TIDB READY DESIRE AGE
basic 5Gi 1 5Gi 1 1 14m

[root@hadoop01 tidb-operator]# kubectl describe tidbclusters -n tidb-cluster basic
Name: basic
Namespace: tidb-cluster
Labels:
Annotations:
API Version: pingcap.com/v1alpha1
Kind: TidbCluster
Metadata:
Creation Timestamp: 2021-09-01T09:40:51Z
Generation: 1
Resource Version: 25621
Self Link: /apis/pingcap.com/v1alpha1/namespaces/tidb-cluster/tidbclusters/basic
UID: 69278a39-c176-4338-b3f0-8d3d80633019
Spec:
Config Update Strategy: RollingUpdate
Discovery:
Limits:
Cpu: 0.1
Requests:
Cpu: 0.1
Enable Dynamic Configuration: true
Pd:
Base Image: pingcap/pd
Config:
Replicas: 1
Requests:
Storage: 5Gi
Storage Class Name: local-storage
Pv Reclaim Policy: Delete
Tidb:
Base Image: pingcap/tidb
Config:
Replicas: 1
Service:
Type: ClusterIP
Tikv:
Base Image: pingcap/tikv
Config:
Raftdb:
Max - Open - Files: 256
Rocksdb:
Max - Open - Files: 256
Storage:
Reserve - Space: 0MB
Replicas: 1
Requests:
Storage: 5Gi
Storage Class Name: local-storage
Timezone: UTC
Version: v5.1.1
Events:

[root@hadoop01 tidb-operator]# kubectl get pods -n tidb-admin
NAME READY STATUS RESTARTS AGE
tidb-controller-manager-697648cbc-7g24l 1/1 Running 0 3h13m
tidb-scheduler-595744f8f-jtnjz 2/2 Running 0 3h13m


先按照这两个 SOP 自查下问题~

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.96.0.1 443/TCP 18h

NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE
local-pv-1c920528 7876Mi RWO Delete Available local-storage 16h
local-pv-41ebb6b9 7876Mi RWO Delete Available local-storage 16h
local-pv-709387a2 7876Mi RWO Delete Available local-storage 16h
local-pv-75cc2cbf 7908Mi RWO Delete Available local-storage 17h
local-pv-c4a0da26 7908Mi RWO Delete Available local-storage 17h
local-pv-edd2e544 7908Mi RWO Delete Available local-storage 17h
pv-1 50Gi RWO Retain Available local-storage 18h
pv-2 50Gi RWO Retain Available local-storage 18h

[root@hadoop01 ~]# kubectl get pods -n tidb-admin
NAME READY STATUS RESTARTS AGE
tidb-controller-manager-697648cbc-7g24l 1/1 Running 0 18h
tidb-scheduler-595744f8f-jtnjz 2/2 Running 0 18h

backups.pingcap.com 2021-09-01T06:48:16Z
backupschedules.pingcap.com 2021-09-01T06:48:16Z
dmclusters.pingcap.com 2021-09-01T06:48:16Z
restores.pingcap.com 2021-09-01T06:48:16Z
tidbclusterautoscalers.pingcap.com 2021-09-01T06:48:16Z
tidbclusters.pingcap.com 2021-09-01T06:48:16Z
tidbinitializers.pingcap.com 2021-09-01T06:48:16Z
tidbmonitors.pingcap.com 2021-09-01T06:48:16Z

检查了服务都是正常的,我上次装成功一次,因为其他问题,环境重新搞了一下就不行了。

安装参考的是这个:
https://docs.pingcap.com/zh/tidb-in-kubernetes/dev/deploy-tidb-operator#在线部署-tidb-operator

  1. 安装过程中的日志是否有报错?
  2. 可以试试重新安装看看,是否会报错吗?
  3. 上次和这次安装的版本都一致吗?
  4. 如果是自己的测试环境,可以看看上次是否清理了 pvc ?

已经重新安装过几遍了,K8S部署了其他的应用都没有问题,版本都是k8s 1.6.9

pvc 清理了吗?可以使用新环境安装一下。

- 如果你的问题已解决:
  - 如果你自己排查解决了,请附上你的解决方案,对自己的方案标记【对我有用】。
  - 如果别人帮助你解决了问题,那么请选择【最有价值】的回复,标记为【对我有用】,对帮助你的人,也是一种嘉奖和赞赏。
- 被标记了【对我有用】的问题,才能被搜索到,这样子也能帮助他人更高效地找到答案。标记了【对我有用】还能获得 5 积分,5 经验值。
- 如果你的问题还没有解决,请继续追问及反馈你遇到的问题。

此话题已在最后回复的 1 分钟后被自动关闭。不再允许新回复。