All scenarios
The scheduler, inside out
+2ms
by Kubesimplify
Step 01 · Informer stream
New pod? It arrives as a watch event.
kube-apiserver
watch cache
GET /api/v1/pods?watch=true
{"type":"ADDED","object":{"kind":"Pod","spec":{"nodeName":""}}}
kube-scheduler
SharedInformer
A
SharedIndexInformer
holds an open HTTP/2 stream. etcd revisions stream into the API server's watch cache, which fans them out. Pods with empty
spec.nodeName
trigger the scheduler's
AddFunc
handler.
pkg/scheduler/eventhandlers.go
HTTP/2 · chunked
Step 01 · kube-apiserver
Scheduler watches the API server, not polls it
1×