<p>While studying about scheduling in k8s,
Ive searched for hours to know how scheduler knows about all the nodes for filtering
but i failed to get informations about it.
I guess that the scheduler gets node informations from etcd through api-server
Is it right?
Big thanks to the future repliers</p>

Kangchan Song
<p>I suggest you take a look at this article on <em><a href="https://banzaicloud.com/blog/k8s-custom-scheduler/" rel="nofollow noreferrer">Creating custom scheduler on kubrnetes</a></em> which explains in details and open-sourced the project in Golang on <a href="https://github.com/martonsereg/random-scheduler/blob/master/cmd/scheduler/main.go" rel="nofollow noreferrer">this repository</a>.</p>
<p>But briefly, <em>the Api-Server</em> periodically updates the list of available nodes in the cluster using some techniques. <em>The scheduler</em> uses <em>Informers</em> API to get the list of available pods from the API-Server. This list is also cached using the Informers to decrease the number of API calls. also the Informer watches the API-Server for new changes on the nodes list.<br />
Then the scheduler binds pods to the proper node using whatever algorithm integrated.</p>
