scheduler-plugins: Getting error when trying to enable coscheduler following develop instructions and tutorial

Moved from https://github.com/kubernetes/website/issues/21128,

Using minikube, I compiled the scheduler-plugins image (according to these instructions), and set the image in my /etc/kubernetes/manifests/kube-scheduler.yaml file of my master node. I.e:

apiVersion: v1
kind: Pod
metadata:
  creationTimestamp: null
  labels:
    component: kube-scheduler
    tier: control-plane
  name: kube-scheduler
  namespace: kube-system
spec:
  containers:
  - command:
    - kube-scheduler
    - --authentication-kubeconfig=/etc/kubernetes/scheduler.conf
    - --authorization-kubeconfig=/etc/kubernetes/scheduler.conf
    - --config=/etc/kubernetes/coscheduling-config.yaml
    - --bind-address=127.0.0.1
    - --kubeconfig=/etc/kubernetes/scheduler.conf
    - --leader-elect=false
    - --port=0
    image: localhost:5000/scheduler-plugins/kube-scheduler:latest   <---- The compiled custom scheduler
    imagePullPolicy: IfNotPresent
    livenessProbe:
      failureThreshold: 8
 .....

Which I thought would create the scheduler pod with the custom scheduler image but I get the error message:

W0219 17:10:50.073294       1 client_config.go:613] error creating inClusterConfig, falling back to default config: open /var/run/secrets/kubernetes.io/serviceaccount/token: no such file or directory
couldn't create scheduler using provider "DefaultProvider": initializing profiles: creating profile for scheduler name default-scheduler: error initializing plugin "Coscheduling": failed to init rest.Config: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable

@Huang-Wei

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (10 by maintainers)

Most upvoted comments

@Frans-Lukas the doc was written for version v0.18.9, and that version doesn’t have a PodGroup CRD. We’re now working on releasing v0.19.X, which introduces PodGroup CRD, and hence the doc needs to be updated - not only the wordings, but also like RBAC, ServiceAccount. I’ve locally walked everything through, stay tuned.

/assign