Hello Guys , Any idea why busybox pod gets stuck in PENDING state when trying to . . .

Vibhas:
Hello Guys , Any idea why busybox pod gets stuck in PENDING state when trying to schedule using custom scheduler as below. It works when I don’t use custom scheduler. I have deployed kubernetes v1.21 using kubeadm

apiVersion: v1
  2 kind: Pod
  3 metadata:
  4   creationTimestamp: null
  5   labels:
  6     component: kube-scheduler
  7     tier: control-plane
  8   name: custom-scheduler
  9   namespace: kube-system
 10 spec:
 11   containers:
 12   - command:
 13     - kube-scheduler
 14     - --authentication-kubeconfig=/etc/kubernetes/scheduler.conf
 15     - --authorization-kubeconfig=/etc/kubernetes/scheduler.conf
 16     - --bind-address=127.0.0.1
 17     - --kubeconfig=/etc/kubernetes/scheduler.conf
 18     - --leader-elect=false  # Tryed to set true but still doesn't work
 19     - --scheduler-name=custom-scheduler
 20     - --lock-object-name=custom-scheduler #Removed this option but still doesn't work
 21     - --port=0 # Removed this option but still doesn't work
 22.    - --secure-port=10260 #Diff than primary scheduler
23 ... changed liveness and readiness probe to 10260

geordam ly:
You should see the pod logs ?

Vibhas:
No events there

geordam ly:
something like

kubectl logs ${POD_NAME} ${CONTAINER_NAME}

geordam ly:
(Sorry, just starting the course so will know more after :smile: )

geordam ly:
from https://kubernetes.io/docs/tasks/debug-application-cluster/debug-application/ it says :

If a Pod is stuck in Pending it means that it can not be scheduled onto a node. Generally this is because there are insufficient resources of one type or another that prevent scheduling.

praveen bushi:
under command: add a new line like below

praveen bushi:
• - – secure-port=<choose any other port other than the primary scheudular port>

Vibhas:
@praveen bushi Tried setting secure-port to some different value but still same.

- --leader-elect=false
- --scheduler-name=custom-scheduler
- --port=0
- --secure-port=10260

praveen bushi:
change teh livenessProbe and startupProbe also to same port 10260…you can remove port=0 and try aain

praveen bushi:
again

Vibhas:
@praveen bushi already changed liveness and startup probe to 10260 + removed port option . but still same.

unnivkn:
Hi… can you please add/update your custom scheduler name in the pod yaml