Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No matches for kind "TidbCluster" in version "pingcap.com/v1alpha1" #19344

Open
ClSlaid opened this issue Aug 20, 2020 · 6 comments
Open

No matches for kind "TidbCluster" in version "pingcap.com/v1alpha1" #19344

ClSlaid opened this issue Aug 20, 2020 · 6 comments
Assignees

Comments

@ClSlaid
Copy link
Contributor

ClSlaid commented Aug 20, 2020

Bug Report

What version of TiKV are you using?

v4.0.4

What operating system and CPU are you using?

kubernetes
system: Ubuntu 18.04 LTS
CPU: AMD EPYC 7K62 48-Core Processor
Actually a one core 1 GiB virtual server.

Steps to reproduce

When following docs, trying to deploy a demo Tidb Cluster on my VPS with the .yaml file

What did you expect?

Successfully deploy TiDB cluster demo.

What did happened?

I stored the content in tidb_cluster.yaml, and tried to deploy TiDB on my VPS with Kubectl.

kubectl apply -f tidb_cluster.yaml

error occured as:

error: unable to recognize "tidb-cluster.yaml": no matches for kind "TidbCluster" in version "pingcap.com/v1alpha1"

Then I looked up more detailed link, its content clearly show that "TidbCluster" is actually in version "pingcap.com/v1alpha1".
So I tried accessing pingcap.com/v1alpha1 with browser, only returning a 404 page.
Using curl to get content.

curl pingcap.com/v1alpha1 | cat

output:

<html>
<head><title>301 Moved Permanently</title></head>
<body>
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>

What happend? Is this a network problem?

@ClSlaid ClSlaid added the type/bug The issue is confirmed as a bug. label Aug 20, 2020
@ekexium
Copy link
Contributor

ekexium commented Aug 21, 2020

/assign @lichunzhu

@lichunzhu
Copy link
Contributor

Have you deployed tidb-operator? https://docs.pingcap.com/tidb-in-kubernetes/stable/deploy-tidb-operator

@ClSlaid
Copy link
Contributor Author

ClSlaid commented Aug 21, 2020

Have you deployed tidb-operator? https://docs.pingcap.com/tidb-in-kubernetes/stable/deploy-tidb-operator

Not really, I may try it later

@yahonda
Copy link
Member

yahonda commented Aug 20, 2021

I've got a similar error yesterday and this issue has been resolved after deploying tidb-operator.

% kubectl create -f ./tidb-cluster.yaml -n tidb-cluster
error: unable to recognize "./tidb-cluster.yaml": no matches for kind "TidbCluster" in version "pingcap.com/v1alpha1"

@hq6
Copy link

hq6 commented Mar 10, 2022

I'm still getting this error despite deploying TiDB operator:

kubectl get pods --namespace tidb-admin -l app.kubernetes.io/instance=tidb-operator
NAME                                      READY   STATUS    RESTARTS   AGE
tidb-controller-manager-8b6495689-kx4tg   1/1     Running   0          3m48s
tidb-scheduler-58558fc9d7-ckkrc           2/2     Running   0          3m48s

kubectl apply -f tidb-cluster.yaml -n tidb-cluster
error: unable to recognize "tidb-cluster.yaml": no matches for kind "TidbCluster" in version "pingcap.com/v1alpha1"

@Tema
Copy link
Contributor

Tema commented Jun 7, 2023

You probably miss CRD from https://docs.pingcap.com/tidb-in-kubernetes/dev/get-started#step-2-deploy-tidb-operator: kubectl create -f https://raw.githubusercontent.com/pingcap/tidb-operator/master/manifests/crd.yaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants