Score:0

How to apply new default kube-scheduler config?

ru flag

Kubernetes version 1.22. Cluster created by kops.

I'm trying to alternate default kube-scheduler config (adding profiles) as descibed here https://kubernetes.io/docs/reference/config-api/kube-scheduler-config.v1beta3/#kubescheduler-config-k8s-io-v1beta3-KubeSchedulerConfiguration .

apiVersion: kubescheduler.config.k8s.io/v1beta3
kind: KubeSchedulerConfiguration
profiles:
  - schedulerName: default-scheduler
    pluginConfig:
blah-blah...

But simple kubectl command fails:

kubectl apply -n kube-system -f scheduler-config.yaml
error: unable to recognize "scheduler-config.yaml": no matches for kind "KubeSchedulerConfiguration" in version "kubescheduler.config.k8s.io/v1beta3"

The KubeSchedulerConfiguration is in "kubescheduler.config.k8s.io/v1beta3". Should I use some another command to apply it?

Thank you for any help!

/Serguei

in flag
Hi Serguei Kamchiline welcome to S.F. Have you tried `kubectl api-versions` against that cluster to see which version it _does_ support? You may want to try examining the existing `KubeSchedulerConfiguration` in the cluster to see what version they are. Good luck!
Serguei Kamchiline avatar
ru flag
Thank you @mdaniel for the reply! You're right, the API version kubescheduler.config.k8s.io/xxxx is not among supported ones... It seems the only way to update the scheduler config is to copy it on the master node manually and restart the scheduler....
in flag
Please do consider [answering and accepting your own question](https://serverfault.com/help/self-answer) in order to show others who find your question how you solved it. That's how this community grows
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.