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

Doesn't work on K8s version 1.27 due to out of date KubeSchedulerConfiguration #5355

Open
adamtwiss opened this issue Oct 24, 2023 · 2 comments

Comments

@adamtwiss
Copy link

adamtwiss commented Oct 24, 2023

Bug Report

What version of Kubernetes are you using?
1.27.3

What version of TiDB Operator are you using?
1.5.1

What storage classes exist in the Kubernetes cluster and what are used for PD/TiKV pods?
Rook: ceph-block/ceph-filesystem

What's the status of the TiDB cluster pods?

NAME                                      READY   STATUS             RESTARTS        AGE   IP             NODE         NOMINATED NODE   READINESS GATES
tidb-controller-manager-58f8f675b-6whgc   1/1     Running            0               18h   10.255.0.252   enkubea001   <none>           <none>
tidb-scheduler-7f6d7b4b84-6l6xp           1/2     CrashLoopBackOff   7 (2m50s ago)   13m   10.255.0.74    enkubea001   <none>           <none>

What did you do?
Clean install.

What did you expect to see?
All pods working

What did you see instead?
In logs for: tidb-scheduler-7f6d7b4b84-6l6xp:kube-scheduler
│ E1024 08:52:14.638974 1 run.go:74] "command failed" err="no kind "KubeSchedulerConfiguration" is registered for version "kubescheduler.config.k8s.io/v1beta2" in scheme "pkg/sched │
│ Stream closed EOF for {$namespace}/tidb-scheduler-7f6d7b4b84-6l6xp (kube-scheduler)

The error is because

apiVersion: kubescheduler.config.k8s.io/v1beta2
creates:
kubescheduler.config.k8s.io/v1beta2 which is now deprecated. The fix is to use just kubescheduler.config.k8s.io/v1 which has been about some time.
beta2 was deprecated in kubernetes1.25, when v1 was released (https://sysdig.com/blog/kubernetes-1-25-whats-new/)

The fix is probably another "if semverCompare" where for version 1.25 or later use v1 of the API.

@csuzhangxc
Copy link
Member

@adamtwiss Thanks for your report. We're planning to upgrade the K8s deps to v1.25.

@csuzhangxc
Copy link
Member

BTW, there is no need to use tidb-scheduler after K8s v1.19, ref https://docs.pingcap.com/tidb-in-kubernetes/stable/tidb-scheduler

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

No branches or pull requests

2 participants