Hi @Mumshad Mannambeth, @Tej_Singh_Rana I am working on scheduler lab, in which . . .

Ismail:
Hi @Mumshad Mannambeth, @Tej_Singh_Rana
I am working on scheduler lab, in which it is asking to create a scheduler. But it is failing…
Here is my yaml file

apiVersion: v1
kind: Pod
metadata:
  creationTimestamp: null
  labels:
    component: kube-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=10250
    - --scheduler-name=my-scheduler
    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: 10250
        scheme: HTTPS
      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: 10250
        scheme: HTTPS
      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: {}

Can you please tell me what is my mistake here?
I have changed port to 0 as well for testing, but still it failed

Memo Toro:
Hi @Ismail are you creating that scheduler as static pod or just as a regular pod. I think I had a similar issues creating another scheduler as static pod, but when I created as a regular pod with kubectl create -f yourfile.yaml it works. Let me know. It could be something completely different. What is your error exactly?

Ismail:
yes, I am using kubectl create -f yourfile.yaml to create it

Ismail:

Warning  BackOff    2m40s (x28 over 7m44s)  kubelet, node01    Back-off restarting failed container

Ismail:

State:          Waiting
      Reason:       CrashLoopBackOff
    Last State:     Terminated
      Reason:       Error
      Exit Code:    1

Ismail:
Is the problem with the image. When I checked from answer folder it had this image: http://k8s.gcr.io/kube-scheduler-amd64:v1.16.0|k8s.gcr.io/kube-scheduler-amd64:v1.16.0

But manifest folder has - 19 verion - http://k8s.gcr.io/kube-scheduler:v1.19.0|k8s.gcr.io/kube-scheduler:v1.19.0

Ismail:
@Mumshad Mannambeth @Tej_Singh_Rana @Ather Tahir @Rahul Soni, Answer shown and file used and the answer video all have different files… Can you please check?

I am unable to run the pod

Memo Toro:
@Ismail you could use the same image the current scheduler is running. Why don’t you use the version 1.19?

Ismail:
I am using 1.19, but in the hints of the question i saw the answer had 1.16 version

Mohamed Ayman:
Check this:
kubectl apply -f /var/answers/my-scheduler.yaml

Ismail:
@Mohamed Ayman i did… and therefore i posted the question…
it is using older version of image and the parameters specified does not work on current used scheduler pod and the one available on docs