Amiyanshu Pratihari:
@Mumshad Mannambeth after creating a custom scheduler , default one is showing error . “root@controlplane:/etc/kubernetes/manifests# kubectl logs kube-scheduler-controlplane --namespace=kube-system
I0709 14:25:55.104333 1 serving.go:331] Generated self-signed cert in-memory
failed to create listener: failed to listen on 127.0.0.1:10259: listen tcp 127.0.0.1:10259: bind: address already in use”
I am not using same port in custom scheduler.
unnivkn:
can you please check the ports in default is using anywhere in custom & vice versa.
unnivkn:
netstat -napult | grep -i scheduler
Tej_Singh_Rana:
Hello, @Amiyanshu Pratihari
Maybe still occupied by livenessProbe
or startupProbe.
Inspect your custom scheduler YAML file again.
cat custom-scheduler.yaml | grep 10259
Amiyanshu Pratihari:
Tried again by creating a new file , this time custom-scheduler is not running . throwing same error . But no where i have mentioned that port .
Pasting config file for reference : "root@controlplane:/etc/kubernetes# cat my-scheduler.yaml
apiVersion: v1
kind: Pod
metadata:
creationTimestamp: null
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
- –port=10282
- –kubeconfig=/etc/kubernetes/scheduler.conf
- –leader-elect=false
- –scheduler-name=my-scheduler
- –port=0
image: http://k8s.gcr.io/kube-scheduler:v1.20.0|k8s.gcr.io/kube-scheduler:v1.20.0
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 8
httpGet:
host: 127.0.0.1
path: /healthz
port: 1025
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: 1025
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: {}"
Do you see any error in config file?
unnivkn:
you have the solution in /var/answers