update the multi-scheduler doc (#2858)

* Add doc for multiple scheduler with leader election enabled

* address comments
This commit is contained in:
Haoran Wang
2017-05-09 12:25:44 +08:00
committed by Andrew Chen
parent 3a4a75bb53
commit 39b069a16c
@@ -92,6 +92,40 @@ my-scheduler-lnf4s-4744f 1/1 Running 0 2m
You should see a "Running" my-scheduler pod, in addition to the default kube-scheduler
pod in this list.
To run multiple-scheduler with leader election enabled, you must do the following:
First, update the following fields in your YAML file:
- --leader-elect=true
- --lock-object-namespace=lock-object-namespace
- --lock-object-name=lock-object-name
If RBAC is enabled on your cluster, you must update the `system:kube-scheduler` cluster role. Add you scheduler name to the resourceNames of the rule applied for endpoints resources, as in the following example:
```
$ kubectl edit clusterrole system:kube-scheduler
- apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
annotations:
rbac.authorization.kubernetes.io/autoupdate: "true"
labels:
kubernetes.io/bootstrapping: rbac-defaults
name: system:kube-scheduler
rules:
- apiGroups:
- ""
resourceNames:
- kube-scheduler
- my-scheduler
resources:
- endpoints
verbs:
- delete
- get
- patch
- update
```
### 4. Specify schedulers for pods
Now that our second scheduler is running, let's create some pods, and direct them to be scheduled by either the default scheduler or the one we just deployed. In order to schedule a given pod using a specific scheduler, we specify the name of the