This page describes how the simulator works.
The simulator server works with the following:
- kube-apiserver (+ etcd)
- scheduler
- controllers for core resources
- HTTP server
When the simulator server starts, it will start these components with server.
Users can create resources below by communicating with kube-apiserver in simulator via any clients (e.g. kubectl, k8s client library or Web UI)
- Nodes
- Pods
- Persistent Volumes
- Persistent Volume Claims
- Storage Classes
- Priority Classes
- Namespaces
When a new pod is created through kube-apiserver, the scheduler starts scheduling.
Normally, when score/filter plugins are called from scheduler, they will calculate the results and return results to the scheduler. But, in the simulator, custom plugins, that behave as score/filter plugin but records result after calculation, are used in scheduler.
The scheduler finally binds the pod to a node if succeeded, or move the pod back to queue if failed.
The result store will notice that the pod has been scheduled/marked as unscheduled by the scheduler and add the scheduling results to the pod's annotation.