Looking for advice in Multiple Scheduler Lab which asks to create a custom sched . . .

Tanumoy Ghosh:
Looking for advice in Multiple Scheduler Lab which asks to create a custom scheduler, here goes the question

Deploy an additional scheduler to the cluster following the given specification.
Use the manifest file used by kubeadm tool. Use a different port than the one used by the current one.

Tanumoy Ghosh:
I have tried different options but everytime it encounters either CrashLoopBackOff or Error

My config:

  name: my-scheduler
  namespace: kube-system
spec:
  containers:
  - command:
    - kube-scheduler
    - --authentication-kubeconfig=/etc/kubernetes/scheduler.conf
    - --authorization-kubeconfig=/etc/kubernetes/scheduler.conf
    - --bind-address=127.0.0.1
    - --kubeconfig=/etc/kubernetes/scheduler.conf
    - --leader-elect=false
    - --port=1
    - --scheduler-name=my-scheduler
    - --lock-object-name=my-scheduler

Pod log error states:

I0605 05:11:07.971346       1 serving.go:331] Generated self-signed cert in-memory
failed to create listener: failed to listen on 127.0.0.1:10259: listen tcp 127.0.0.1:10259: bind: address already in use

Tanumoy Ghosh:
Basically in the above config changes done:
• .metadata.name updated
• made leader-elect value as false since single master cluster
• change the port value from 0 to 1 as asked in question
• Added scheduler-name and lock-object-name property as per lecture

unnivkn:
Please refer the given solution at /var/answers

Fernando Jimenez:
Please, see if these changes will do.
https://kodekloud.slack.com/archives/CHMV3P9NV/p1622666286015300?thread_ts=1622661259.004700&cid=CHMV3P9NV

Tanumoy Ghosh:
So this needs only --secure-port option to be introduced and to replace all the occurrences of default 10259 port with the one defining for the custom scheduler, Thanks again Fernando

@Mohamed Ayman This need to be rectified or probably require to be added in the lab question hint itself for Question 3 of multiple scheduler, current solution is not spinning up the pod