The kubeadm tool deploys the scheduler as a Pod. You can find the definition file in /etc/kubernetes/manifests/kube-scheduler.yaml
We can create a custom scheduler by making a copy of the same file.
Options that needed to be changed:
--scheduler-name=my-custom-kube-scheduler # name of the new scheduler
--leader-elect=true # help choose leader among multiple schedulers. Set to
# false when multiple masters do not exist, true when multiple masters exist
If multiple copies of the same scheduler are running on different nodes, only one can be active at a time. That’s where the leader-elect option helps in choosing a leader who will lead scheduling activities.--lock-object-name=my-custom-kube-scheduler
lock-object-name is the name of the resource object that is used for locking during leader election.