This is a question about the design of Kubernetes, I don't have a specific technical problem to solve, but I'm trying to understand the thoughts behind some of its architecture.
All explanations about Kubernetes' control plane that I've seen mention that it consists of:
- a controller manager
- a scheduler
(among other components, but they're not important for the question)
From what I understand, the controller manager is a helper process which groups multiple controllers together for performance reasons. It watches the API server and has some state machine, the shared informer, which effectively allows many controllers to share a relatively expensive watch of the API server and be guaranteed some form of consistency since they all run in the same operating system process.
If I understand correctly, the scheduler itself is also a controller, whose goal is to assign a nodeName
to pods so that they will be picked up and run by the kubelets.
Now, what I have not been able to find out is why the scheduler is run as a separate process. Would it be possible to make a scheduler that runs as part of the controller manager? If so, what is the reason for not making it part of the latter by default?