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 .

kind: KubeSchedulerConfiguration
  - schedulerName: default-scheduler

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 ""

The KubeSchedulerConfiguration is in "". Should I use some another command to apply it?

Thank you for any help!


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 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]( in order to show others who find your question how you solved it. That's how this community grows

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.