You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: simulator/docs/extender.md
+23-20
Original file line number
Diff line number
Diff line change
@@ -11,14 +11,12 @@ The simulator stores the results of each Extender in the annotation of a pod.
11
11
Note: This feature is not available in [external scheduler](./external-scheduler.md).
12
12
13
13
## How to use
14
+
In this example, we describe how you can run an extender with the simulator, using [k8s-scheduler-extender-example](https://github.com/everpeace/k8s-scheduler-extender-example).
14
15
15
-
You need to configure your extender in KubeSchedulerConfig.
16
-
(via [the simulator config](./simulator-server-config.md) or WebUI)
16
+
+ Create k8s-scheduler-extender-example's Image: Clone [k8s-scheduler-extender-example](https://github.com/everpeace/k8s-scheduler-extender-example) repository, and follow the step `1 build a docker image` on README.
17
17
18
-
(No required special configuration is for the simulator to use this feature.)
19
-
20
-
For example, if you run the server on `http://localhost:8080/scheduler/`,
21
-
the configuration will look like this.
18
+
+ Set up your extender in KubeSchedulerConfiguration either through [`kubeSchedulerConfigPath`](./simulator-server-config.md) or the Web UI.
19
+
For example, if you are running the server on http://kube-scheduler-simulator-extender-1:80/scheduler/, your configuration might look like the following:
After the above settings are made, when the simulator is started and the pod is scheduled,
42
-
you will see each Pod gets many results on the annotation like this:
39
+
+ Run Simulator:
40
+
We have an example [`docker-compose.yaml`](./example/docker-compose.yaml); you can overwrite the [`docker-compose-local.yaml`](../../docker-compose-local.yml) file with this file, but make sure to update the extender's image name there.
41
+
42
+
To run the simulator, use the following commands:
43
+
```sh
44
+
$ make docker_build docker_up_local
45
+
```
46
+
47
+
+ Create a Pod and examine your Extender's Results:
48
+
The simulator started with the above steps should have your extender(s) enabled. You can create Pod(s) in the simulator and see the result.
49
+
The result shows up in the Pod's annotations `scheduler-simulator/extender-xxx` like the following:
You can also view the annotation results from the web UI. Simply select the Pod you created and scheduled, then check the Resource Definition section to see the annotations.
0 commit comments