MB:
Hello, I have to create a customer scheduler and it’s getting on my nerves already. I did exactly like in the solution video and it’s not working. I checked the logs and it says that 10259 (old scheduler port) is already in use. I specified another port but I receive the same error!
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
- –scheduler-name=my-scheduler
- –port=10255
Mohamed Ayman:
Can you please this YAML file
apiVersion: v1
kind: Pod
metadata:
annotations:
<http://scheduler.alpha.kubernetes.io/critical-pod:|scheduler.alpha.kubernetes.io/critical-pod:> ""
creationTimestamp: null
labels:
component: my-scheduler
tier: control-plane
name: my-scheduler
namespace: kube-system
spec:
containers:
hostNetwork: true
priorityClassName: system-cluster-critical
volumes:
status: {}
Ravi Shanker:
The solution shows correct only when port 10282 is used and shows incorrect solution for all other ports. This behavior seems to be wrong or there is something which ought to be known to resolve the question correctly to put only 10282 port in solution/
Phani M:
No, I tried with a different port number and worked fine.
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=10382
- --scheduler-name=my-scheduler
- --secure-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: 10382
scheme: HTTP
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: 10382
scheme: HTTP
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 15
volumeMounts:
- mountPath: /etc/kubernetes/scheduler.conf
name: kubeconfig
readOnly: true
hostNetwork: true
priorityClassName: system-node-critical
"mysch.yaml" 59L, 1443C
Ravi Shanker:
Did you select the new port using netstat command output shown in solutions video or just a random try ? If the netstat command is the correct way then it should work uniformly and not randomly on selection of unused ports. I am suspecting there is something more to it which at least I don’t know.