pingcap / tidb-operator

TiDB operator creates and manages TiDB clusters running in Kubernetes.
https://docs.pingcap.com/tidb-in-kubernetes/
Apache License 2.0
1.22k stars 493 forks source link

Can't create pvc by operator #659

Closed sayume closed 5 years ago

sayume commented 5 years ago

What version of Kubernetes are you using?

Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.5", GitCommit:"2166946f41b36dea2c4626f90a77706f426cdea2", GitTreeState:"clean", BuildDate:"2019-03-25T15:26:52Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.5", GitCommit:"2166946f41b36dea2c4626f90a77706f426cdea2", GitTreeState:"clean", BuildDate:"2019-03-25T15:19:22Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}

What version of TiDB Operator are you using?

TiDB Operator Version: version.Info{TiDBVersion:"2.1.0", GitVersion:"v1.0.0-beta.3", GitCommit:"6257dfaad68f55f745f20f6f5d19b10bea2b0bea", GitTreeState:"clean", BuildDate:"2019-06-06T09:51:04Z", GoVersion:"go1.12", Compiler:"gc", Platform:"linux/amd64"}

What storage classes exist in the Kubernetes cluster and what are used for PD/TiKV pods?

What's the status of the TiDB cluster pods?

What did you do?

helm install pingcap/tidb-cluster --name=demo --namespace=kube-system --version=v1.0.0-beta.3

I got:

Events:
  Type       Reason                Age                   From                         Message
  ----       ------                ----                  ----                         -------
  Normal     WaitForFirstConsumer  14s (x10 over 2m10s)  persistentvolume-controller  waiting for first consumer to be created before binding

Events:
  Type     Reason            Age                   From            Message
  ----     ------            ----                  ----            -------
  Warning  FailedScheduling  102s (x25 over 104s)  tidb-scheduler  0/3 nodes are available: 3 node(s) didn't find available persistent volumes to bind.

Seems something is missing.

What did you expect to see?

What did you see instead?

weekface commented 5 years ago

What storageClassName are you using?

Is there any pv in the system?

kubectl get pv
sayume commented 5 years ago

I found https://github.com/aylei/tidb-operator/blob/ccd0ad773e630de01abfcd46f582766c292b79e8/docs/setup.md, the pv is not created automatic, but I don't find anything relate in official docs.

weekface commented 5 years ago

Here is the setup document: https://github.com/pingcap/tidb-operator/blob/master/docs/setup.md