Unable to use create pod using custom scheduler

While practicing creation of custom scheduler and thereafter creating a pod, I am facing an issue.

  1. Created a custom scheduler as “my-scheduler-master” and checked it be running.

master $ kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
default nginx 0/1 Pending 0 5m41skube-system coredns-5644d7b6d9-jtggs 1/1 Running 0 36m
kube-system coredns-5644d7b6d9-w5886 1/1 Running 0 36m
kube-system etcd-master 1/1 Running 0 35m
kube-system kube-apiserver-master 1/1 Running 0 35m
kube-system kube-controller-manager-master 1/1 Running 0 35mkube-system kube-proxy-66zng 1/1 Running 0 35m
kube-system kube-proxy-8v5nb 1/1 Running 0 36m
kube-system kube-scheduler-master 0/1 CrashLoopBackOff 9 21mkube-system my-scheduler-master 1/1 Running 0 17mkube-system weave-net-ff8lr 2/2 Running 1 36m
kube-system weave-net-snpn9 2/2 Running 1 35m

  1. Then created pod definition file by adding “schedulerName: my-scheduler-master” as below

master $ cat /root/nginx-pod.yaml
apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
schedulerName: my-scheduler-master
containers:

  • image: nginx
    name: nginx
  1. Then created pod using kubectl create command but the status of pod is seen to be Pending. What am I missing here ? Please suggest.

master $ kubectl get pods
NAME READY STATUS RESTARTS AGE
nginx 0/1 Pending 0 9m39s

Got the issue. I used scheduler name as my-scheduler-master incorrectly.
It should be my-scheduler.