使用配置文件部署tidb集群:
kubectl create -f tidb-cluster.yaml
发现pods一直是pending状态:
[root@node01 tidb]# kubectl get po -n tidb-cluster -w
NAME READY STATUS RESTARTS AGE
advanced-tidb-discovery-57cc6b9bbf-r65gj 1/1 Running 0 29s
advanced-tidb-pd-0 0/1 Pending 0 29s
advanced-tidb-pd-1 0/1 Pending 0 29s
advanced-tidb-pd-2 0/1 Pending 0 29s
查看pvc,也没有挂载成功:
[root@node01 tidb]# kubectl get pvc -n tidb-cluster
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
pd-advanced-tidb-pd-0 Pending local-path 101s
pd-advanced-tidb-pd-1 Pending local-path 101s
pd-advanced-tidb-pd-2 Pending local-path 101s
pd-nfs-volume-advanced-tidb-pd-0 Pending nfs-tidb 101s
pd-nfs-volume-advanced-tidb-pd-1 Pending nfs-tidb 101s
pd-nfs-volume-advanced-tidb-pd-2 Pending nfs-tidb 101s
describe pvc:
Name: pd-nfs-volume-advanced-tidb-pd-0
Namespace: tidb-cluster
StorageClass: nfs-tidb
Status: Pending
Volume:
Labels: app.kubernetes.io/component=pd
app.kubernetes.io/instance=advanced-tidb
app.kubernetes.io/managed-by=tidb-operator
app.kubernetes.io/name=tidb-cluster
Annotations: volume.beta.kubernetes.io/storage-provisioner: cluster.local/nfs-subdir-external-provisioner-tidb
Finalizers: [kubernetes.io/pvc-protection]
Capacity:
Access Modes:
VolumeMode: Filesystem
Mounted By: advanced-tidb-pd-0
Events:
Type Reason Age From Message
Normal ExternalProvisioning 2m2s (x26 over 8m7s) persistentvolume-controller waiting for a volume to be created, either by external provisioner “cluster.local/nfs-subdir-external-provisioner-tidb” or manually created by system administrator
tidb-cluster.yaml (36.4 KB)
附我的配置文件,感谢