i have created a custom scheduler, which has been in running state.
however, when i create a new pod, assigning it to the custom scheduler, through
.spec.schedulerName. the pod has been stuck in pending state.
here are the sample configuration
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=true - --port=10351 - --scheduler-nam=my-scheduler - --secure-port=10359 image: k8s.gcr.io/kube-scheduler:v1.16.0 imagePullPolicy: IfNotPresent
apiVersion: v1 kind: Pod metadata: name: nginx spec: schedulerName: my-scheduler containers: - image: nginx name: nginx
turns out the issue was with the
--leader-elect. seems like the scheduler is not able to move forward with the
--leader-elect set to true.