Kubernetes scheduler includes two parts: predicate and priority. The source code is in kubernetes/plugin/pkg/scheduler. I want to add a new priority algorithm to the default priorities. Can anyone guide me the detailed steps? Thanks a lot!
Maybe I should do the following steps:
If there are more detailed articles and documents, it will help me a lot! The more detailed the better!Thanks a lot!
k8s version: 1.2.0, 1.4.0 or later.
You can run your scheduler as a kubernetes deployment.
Kelsey Hightower has an example scheduler coded up on Github
The meat and bones of this is here: https://github.com/kelseyhightower/scheduler/blob/master/bestprice.go
And the deployment yaml is here
Essentially, you can package it up as a docker container and deploy it.
Take note of the way you interact with the k8s API using this package in order to do it this way you'll need to have a similar wrapper, but it's much easier than building/recompiling the whole k8s package.