Skip to content

Commit c0b6141

Browse files
authored
update install.md (AliyunContainerService#206)
1 parent 10d7dc0 commit c0b6141

File tree

1 file changed

+29
-26
lines changed

1 file changed

+29
-26
lines changed

docs/install.md

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -28,67 +28,70 @@ kubectl create -f https://raw.githubusercontent.com/AliyunContainerService/gpush
2828

2929
## 2\. Modify scheduler configuration
3030
The goal is to include `scheduler-policy-config.json` into the scheduler configuration (`/etc/kubernetes/manifests/kube-scheduler.yaml`).
31-
Here is the sample of the final modified [kube-scheduler.yaml](../config/kube-scheduler.yaml)
32-
33-
#### Kubernetes v1.23+
34-
From Kubernetes v1.23 [scheduling policies are no longer supported](https://kubernetes.io/docs/reference/scheduling/policies/) instead [scheduler configurations](https://kubernetes.io/docs/reference/scheduling/config/) should be used.
35-
That means `scheduler-policy-config.yaml` needs to be included in the scheduler config (`/etc/kubernetes/manifests/kube-scheduler.yaml`).
36-
Here is the sample of the final modified [kube-scheduler.yaml](../config/kube-scheduler-v1.23+.yaml)
3731

3832
> Notice: If your Kubernetes default scheduler is deployed as static pod, don't edit the yaml file inside /etc/kubernetes/manifest. You need to edit the yaml file outside the `/etc/kubernetes/manifest` directory. and copy the yaml file you edited to the '/etc/kubernetes/manifest/' directory, and then kubernetes will update the default static pod with the yaml file automatically.
3933
40-
### 2.1 Copy scheduler config file into /etc/kubernetes
34+
### 2.1 Kubernetes v1.23+
35+
From Kubernetes v1.23 [scheduling policies are no longer supported](https://kubernetes.io/docs/reference/scheduling/policies/) instead [scheduler configurations](https://kubernetes.io/docs/reference/scheduling/config/) should be used.
36+
That means `scheduler-policy-config.yaml` needs to be included in the scheduler config (`/etc/kubernetes/manifests/kube-scheduler.yaml`).
4137

42-
```bash
43-
cd /etc/kubernetes
44-
curl -O https://raw.githubusercontent.com/AliyunContainerService/gpushare-scheduler-extender/master/config/scheduler-policy-config.json
45-
````
38+
Here is the sample of the final modified [kube-scheduler.yaml](../config/kube-scheduler-v1.23+.yaml)
4639

47-
#### Kubernetes v1.23+
40+
#### 2.1.1 Copy scheduler config file into /etc/kubernetes
4841

4942
```bash
5043
cd /etc/kubernetes
5144
curl -O https://raw.githubusercontent.com/AliyunContainerService/gpushare-scheduler-extender/master/config/scheduler-policy-config.yaml
52-
````
53-
54-
### 2.1 Add Policy config file parameter in scheduler arguments
55-
56-
```yaml
57-
- --policy-config-file=/etc/kubernetes/scheduler-policy-config.json
5845
```
59-
60-
#### Kubernetes v1.23+
46+
#### 2.1.2 Add Policy config file parameter in scheduler arguments
6147

6248
```yaml
6349
- --config=/etc/kubernetes/scheduler-policy-config.yaml
6450
```
6551
66-
### 2.2 Add volume mount into Pod Spec
52+
#### 2.1.3 Add volume mount into Pod Spec
6753
6854
```yaml
69-
- mountPath: /etc/kubernetes/scheduler-policy-config.json
55+
- mountPath: /etc/kubernetes/scheduler-policy-config.yaml
7056
name: scheduler-policy-config
7157
readOnly: true
7258
```
7359
7460
```yaml
7561
- hostPath:
76-
path: /etc/kubernetes/scheduler-policy-config.json
62+
path: /etc/kubernetes/scheduler-policy-config.yaml
7763
type: FileOrCreate
7864
name: scheduler-policy-config
7965
```
8066
81-
#### Kubernetes v1.23+
67+
### 2.2 Before Kubernetes v1.23
68+
69+
Here is the sample of the final modified [kube-scheduler.yaml](../config/kube-scheduler.yaml)
70+
71+
#### 2.2.1 Copy scheduler config file into /etc/kubernetes
72+
73+
```bash
74+
cd /etc/kubernetes
75+
curl -O https://raw.githubusercontent.com/AliyunContainerService/gpushare-scheduler-extender/master/config/scheduler-policy-config.json
76+
```
77+
78+
#### 2.2.2 Add Policy config file parameter in scheduler arguments
8279

8380
```yaml
84-
- mountPath: /etc/kubernetes/scheduler-policy-config.yaml
81+
- --policy-config-file=/etc/kubernetes/scheduler-policy-config.json
82+
```
83+
84+
#### 2.2.3 Add volume mount into Pod Spec
85+
86+
```yaml
87+
- mountPath: /etc/kubernetes/scheduler-policy-config.json
8588
name: scheduler-policy-config
8689
readOnly: true
8790
```
8891
8992
```yaml
9093
- hostPath:
91-
path: /etc/kubernetes/scheduler-policy-config.yaml
94+
path: /etc/kubernetes/scheduler-policy-config.json
9295
type: FileOrCreate
9396
name: scheduler-policy-config
9497
```

0 commit comments

Comments
 (0)