apiVersion: v1 kind: ConfigMap metadata: name: scheduler-config namespace: kube-system data: scheduler-config.yaml: | apiVersion: kubescheduler.config.k8s.io/v1beta1 kind: KubeSchedulerConfiguration leaderElection: leaderElect: false profiles: - schedulerName: "greedy-scheduler" plugins: score: disabled: - name: "*" enabled: - name: "greedy" pluginConfig: - name: "greedy" args: {"master": "master", "kubeconfig": "kubeconfig"} --- apiVersion: apps/v1 kind: Deployment metadata: name: greedy-scheduler namespace: kube-system labels: component: greedy-scheduler spec: replicas: 1 selector: matchLabels: component: greedy-scheduler template: metadata: labels: component: greedy-scheduler spec: serviceAccount: greedy-scheduler-sa priorityClassName: system-cluster-critical volumes: - name: scheduler-config configMap: name: scheduler-config nodeSelector: dedicated: master tolerations: - key: node-role.kubernetes.io/master operator: Exists effect: NoSchedule containers: - name: greedy-scheduler image: fusidic/greedy-scheduler:0.3 imagePullPolicy: IfNotPresent args: - greedy-scheduler - --config=/etc/kubernetes/scheduler-config.yaml - --v=3 resources: requests: cpu: "100m" volumeMounts: - name: scheduler-config mountPath: /etc/kubernetes --- kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: name: greedy-scheduler-clusterrole rules: - apiGroups: - "" resources: - endpoints - events verbs: - create - get - update - apiGroups: - "" resources: - nodes verbs: - get - list - watch - apiGroups: - "" resources: - pods verbs: - delete - get - list - watch - update - apiGroups: - "" resources: - bindings - pods/binding verbs: - create - apiGroups: - "" resources: - pods/status verbs: - patch - update - apiGroups: - "" resources: - replicationcontrollers - services verbs: - get - list - watch - apiGroups: - apps - extensions resources: - replicasets verbs: - get - list - watch - apiGroups: - apps resources: - statefulsets verbs: - get - list - watch - apiGroups: - policy resources: - poddisruptionbudgets verbs: - get - list - watch - apiGroups: - "" resources: - persistentvolumeclaims - persistentvolumes verbs: - get - list - watch - apiGroups: - "" resources: - configmaps verbs: - get - list - watch - apiGroups: - "storage.k8s.io" resources: - storageclasses - csinodes verbs: - watch - list - get - apiGroups: - "coordination.k8s.io" resources: - leases verbs: - create - get - list - update - apiGroups: - "events.k8s.io" resources: - events verbs: - create - patch - update --- apiVersion: v1 kind: ServiceAccount metadata: name: greedy-scheduler-sa namespace: kube-system --- kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: greedy-scheduler-clusterrolebinding namespace: kube-system roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: greedy-scheduler-clusterrole subjects: - kind: ServiceAccount name: greedy-scheduler-sa namespace: kube-system