I stuck at adding additional scheduler to the cluster in "Practice Test Multiple . . .

PP:
I stuck at adding additional scheduler to the cluster in “Practice Test Multiple Scheduler” Q3 I created scheduler as per answer. Can anyone help on it please?
image.png

Marco Tony:
Ask me

Marco Tony:
This is not running

Marco Tony:
check the status first

PP:

image.png

PP:
its running

PP:
Here is the Yaml
apiVersion: v1
kind: Pod
metadata:
creationTimestamp: null
labels:
component: my-scheduler
tier: control-plane
name: my-scheduler
namespace: kube-system
spec:
containers:

  • command:
    • kube-scheduler
    • –address=127.0.0.1
    • –kubeconfig=/etc/kubernetes/scheduler.conf
    • –leader-elect=false
    • –port=10282
    • –scheduler-name=my-scheduler
    • –secure-port=0
      image: http://k8s.gcr.io/kube-scheduler-amd64:v1.16.0|k8s.gcr.io/kube-scheduler-amd64:v1.16.0
      imagePullPolicy: IfNotPresent
      livenessProbe:
      failureThreshold: 8
      httpGet:
      host: 127.0.0.1
      path: /healthz
      port: 10282
      scheme: HTTP
      initialDelaySeconds: 15
      timeoutSeconds: 15
      name: kube-scheduler
      resources:
      requests:
      cpu: 100m
      volumeMounts:
    • mountPath: /etc/kubernetes/scheduler.conf
      name: kubeconfig
      readOnly: true
      hostNetwork: true
      priorityClassName: system-cluster-critical
      volumes:
  • hostPath:
    path: /etc/kubernetes/scheduler.conf
    type: FileOrCreate
    name: kubeconfig
    status: {}

PP:
when I compare with the answer both are identical. But still when I try to check its showing error

Marco Tony:
how you created this pod?

PP:
created the my-scheduler.yaml in /etc/kubernetes/manifests folder

PP:
and checking by using : k get po -A -n kube-system -w

Marco Tony:
mmm it should works

Marco Tony:
maybe some delays in the KodeKloud platform

Ram:
@PP I guess it’s probably they are not expecting you to create that scheduler as a static pod. Try creating the pod as usual (kubectl apply -f <filename>) instead of placing it in the manifest dir.

Marco Tony:
@Ram I confirm I created it as a static pod

Marco Tony:
even because it’s a scheduler

PP:
Yes @Ram Its scheduler. Also in the question they said copy the existing scheduler and change the specification as mentioned

PP:
I believe Lab environment has some issue.

PP:
Let me try another time

Ram:
Sure. I was curious and just tried it myself. It worked for me as a non-static pod. If you notice, the static pod’s name will be “my-scheduler-controlplane” and not “my-scheduler” as expected in the question. Probably that was the trick. For the following question also, I was able to schedule a pod using my new scheduler