In practice test "Multiple Schedulers" I'm getting error : the pod(my-scheduler) . . .

Karnajit De:
In practice test “Multiple Schedulers” I’m getting error : the pod(my-scheduler) is in CrashLoopBackOff state, when did a describe its says:
Events:
Type Reason Age From Message


Normal Scheduled 5m32s default-scheduler Successfully assigned kube-system/my-scheduler to controlplane
Normal Pulled 3m26s (x5 over 5m23s) kubelet Container image “http://k8s.gcr.io/kube-scheduler:v1.20.0|k8s.gcr.io/kube-scheduler:v1.20.0” already present on machine
Normal Created 3m26s (x5 over 5m21s) kubelet Created container my-scheduler
Normal Started 3m25s (x5 over 5m20s) kubelet Started container my-scheduler
Warning BackOff 14s (x25 over 5m10s) kubelet Back-off restarting failed container

can someone please help me here

Mohamed Ayman:
Please use this YAML file

Mohamed Ayman:
apiVersion: v1
kind: Pod
metadata:
labels:
component: my-scheduler
tier: control-plane
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=10282
    • –scheduler-name=my-scheduler
    • –secure-port=0
      image: http://k8s.gcr.io/kube-scheduler:v1.19.0|k8s.gcr.io/kube-scheduler:v1.19.0
      imagePullPolicy: IfNotPresent
      livenessProbe:
      failureThreshold: 8
      httpGet:
      host: 127.0.0.1
      path: /healthz
      port: tel:10282|10282
      scheme: HTTP
      initialDelaySeconds: 10
      periodSeconds: 10
      timeoutSeconds: 15
      name: kube-scheduler
      resources:
      requests:
      cpu: 100m
      startupProbe:
      failureThreshold: 24
      httpGet:
      host: 127.0.0.1
      path: /healthz
      port: tel:10282|10282
      scheme: HTTP
      initialDelaySeconds: 10
      periodSeconds: 10
      timeoutSeconds: 15
      volumeMounts:
    • mountPath: /etc/kubernetes/scheduler.conf
      name: kubeconfig
      readOnly: true
      hostNetwork: true
      priorityClassName: system-node-critical
      volumes:
  • hostPath:
    path: /etc/kubernetes/scheduler.conf
    type: FileOrCreate
    name: kubeconfig
    status: {}

Karnajit De:
Thanks @Mohamed Ayman It worked…
Though I also checked the solution video which doesn’t say anything about the port no.
Just wondering if anything changed about how multiple schedulers work in K8 version 18/19 as compared to 20