Hello All, I am trying to configure the multiple scheduler in the lab, but its . . .

Mihir Lele:
Hello All,

I am trying to configure the multiple scheduler in the lab, but its failing with pod state in CrashLoopBackOff .

root@controlplane:~# kubectl get po -A | grep scheduler
kube-system kube-scheduler-controlplane 1/1 Running 0 6m40s
kube-system my-scheduler-controlplane 0/1 CrashLoopBackOff 4 118s

The pod shows the below error:

root@controlplane:~# kubectl logs my-scheduler-controlplane -n kube-system
I0805 12:10:15.129877 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

I also tried modifying the container port in the yaml definition, but that does not help.

Pasting the yaml definition file below:

https://paste.centos.org/view/cf9ccc92

Here are the command outputs when I tried to change the port in the yaml definition:

root@controlplane:~# kubectl logs my-scheduler-controlplane -n kube-system
I0805 12:29:36.899961 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
root@controlplane:~# netstat -tulpn | grep 10259
tcp 0 0 127.0.0.1:10259 0.0.0.0:* LISTEN 4080/kube-scheduler
root@controlplane:~# netstat -tulpn | grep 10279
root@controlplane:~# grep port /etc/kubernetes/manifests/my-scheduler.yaml
port: 10279
port: 10279
root@controlplane:~# kubectl get po -A | grep scheduler
kube-system kube-scheduler-controlplane 1/1 Running 0 13m
kube-system my-scheduler-controlplane 0/1 CrashLoopBackOff 3 96s

Has anyone came across the same issue?

unnivkn:
Did you get a chance to follow this ? https://github.com/kodekloudhub/certified-kubernetes-administrator-course/blob/master/docs/03-Scheduling/19-Practice-Test-Multiple-Schedulers.md

Mihir Lele:
Thanks for your response! I am not sure whether I got you, but I am trying https://kodekloud.com/topic/practice-test-multiple-schedulers-2/

Mihir Lele:
I followed the same steps i.e, copy the original /etc/kubernetes/manifests/kube-scheduler.yaml, edit and add it to /etc/kubernetes/manifests/my-scheduler.yaml

manoj:
in the lab questions, there is “answer” tab. You will see the answer there.

Mihir Lele:
Thanks @manoj!

Augusto:
@Mihir Lele I got the same problem. The thing is the option --port (is deprecated). You need to use instead --secure-port option.

Augusto:
This just in order to change the port for another one.