Skip to content

Commit c80c9c4

Browse files
author
Cweiping
authored
fix page configure-multiple-schedulers/#enable-leader-election style error (#22642)
* fix https://kubernetes.io/docs/tasks/extend-kubernetes/configure-multiple-schedulers/#enable-leader-election style error Signed-off-by: Weiping Cai <[email protected]> * fix https://kubernetes.io/docs/tasks/extend-kubernetes/configure-multiple-schedulers/#enable-leader-election style error Signed-off-by: Weiping Cai <[email protected]>
1 parent 5c27482 commit c80c9c4

File tree

2 files changed

+39
-39
lines changed

2 files changed

+39
-39
lines changed

content/en/docs/tasks/extend-kubernetes/configure-multiple-schedulers.md

Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -129,45 +129,8 @@ If RBAC is enabled on your cluster, you must update the `system:kube-scheduler`
129129
```
130130
kubectl edit clusterrole system:kube-scheduler
131131
```
132-
```yaml
133-
apiVersion: rbac.authorization.k8s.io/v1
134-
kind: ClusterRole
135-
metadata:
136-
annotations:
137-
rbac.authorization.kubernetes.io/autoupdate: "true"
138-
labels:
139-
kubernetes.io/bootstrapping: rbac-defaults
140-
name: system:kube-scheduler
141-
rules:
142-
- apiGroups:
143-
- coordination.k8s.io
144-
resources:
145-
- leases
146-
verbs:
147-
- create
148-
- apiGroups:
149-
- coordination.k8s.io
150-
resourceNames:
151-
- kube-scheduler
152-
- my-scheduler
153-
resources:
154-
- leases
155-
verbs:
156-
- get
157-
- update
158-
- apiGroups:
159-
- ""
160-
resourceNames:
161-
- kube-scheduler
162-
- my-scheduler
163-
resources:
164-
- endpoints
165-
verbs:
166-
- delete
167-
- get
168-
- patch
169-
- update
170-
```
132+
133+
{{< codenew file="admin/sched/clusterrole.yaml" >}}
171134

172135
## Specify schedulers for pods
173136

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: ClusterRole
3+
metadata:
4+
annotations:
5+
rbac.authorization.kubernetes.io/autoupdate: "true"
6+
labels:
7+
kubernetes.io/bootstrapping: rbac-defaults
8+
name: system:kube-scheduler
9+
rules:
10+
- apiGroups:
11+
- coordination.k8s.io
12+
resources:
13+
- leases
14+
verbs:
15+
- create
16+
- apiGroups:
17+
- coordination.k8s.io
18+
resourceNames:
19+
- kube-scheduler
20+
- my-scheduler
21+
resources:
22+
- leases
23+
verbs:
24+
- get
25+
- update
26+
- apiGroups:
27+
- ""
28+
resourceNames:
29+
- kube-scheduler
30+
- my-scheduler
31+
resources:
32+
- endpoints
33+
verbs:
34+
- delete
35+
- get
36+
- patch
37+
- update

0 commit comments

Comments
 (0)