                         watch-connect-timeout-ms (assoc :connect-timeout-ms watch-connect-timeout-ms)
                         watch-socket-timeout-ms (assoc :socket-timeout-ms watch-socket-timeout-ms))
         watch-state (atom nil)
-        scheduler-config {:api-server-url url
-                          :cluster-name cluster-name
-                          :container-running-grace-secs container-running-grace-secs
-                          :http-client http-client
-                          :leader?-fn leader?-fn
-                          :replicaset-api-version replicaset-api-version
-                          :restart-expiry-threshold restart-expiry-threshold
-                          :restart-kill-threshold restart-kill-threshold
-                          :service-id->failed-instances-transient-store service-id->failed-instances-transient-store
-                          :watch-state watch-state}
-        get-service->instances-fn #(get-service->instances scheduler-config)
+        scheduler-promise (promise) ;; resolves circular dependency
+        get-service->instances-fn (fn []
+                                    (if (realized? scheduler-promise)
+                                      (get-service->instances @scheduler-promise)
+                                      (do
+                                        (log/warn "scheduler instance has not yet been initialized")
+                                        {})))
         {:keys [retrieve-syncer-state-fn]} (start-scheduler-syncer-fn
                                              scheduler-name
                                              get-service->instances-fn

   - it has restarted too many times (reached the restart-expiry-threshold threshold)
   - the primary container (waiter-apps) has not transitioned to running state in container-running-grace-secs seconds
   - the pod has the waiter/pod-expired=true annotation."
  [{:keys [container-running-grace-secs restart-expiry-threshold watch-state] :as scheduler-config}
   service-id instance-id restart-count {:keys [waiter/pod-expired waiter/revision-timestamp]}
   primary-container-status pod-started-at]
  (let [rs-revision-timestamp-path [:service-id->service service-id :k8s/replicaset-annotations :waiter/revision-timestamp]

          auth-renewer (when authentication
                         (start-auth-renewer authentication))
          retrieve-auth-token-state-fn (or (:query-state-fn auth-renewer) (constantly nil))
          scheduler-config {:api-server-url url
                            :authorizer authorizer
                            :cluster-name cluster-name
                            :container-running-grace-secs container-running-grace-secs
                            :custom-options custom-options
                            :daemon-state daemon-state
                            :fileserver fileserver
                            :http-client http-client
                            :leader?-fn leader?-fn
                            :log-bucket-url log-bucket-url
                            :max-patch-retries max-patch-retries
                            :max-name-length max-name-length
                            :pdb-api-version pdb-api-version
                            :pdb-spec-builder-fn pdb-spec-builder-fn
                            :pod-base-port pod-base-port
                            :pod-sigkill-delay-secs pod-sigkill-delay-secs
                            :pod-suffix-length pod-suffix-length
                            :replicaset-api-version replicaset-api-version
                            :replicaset-spec-builder-fn replicaset-spec-builder-fn
                            :restart-expiry-threshold restart-expiry-threshold
                            :restart-kill-threshold restart-kill-threshold
                            :retrieve-auth-token-state-fn retrieve-auth-token-state-fn
                            :retrieve-syncer-state-fn retrieve-syncer-state-fn
                            :reverse-proxy reverse-proxy
                            :scheduler-name scheduler-name
                            :service-id->failed-instances-transient-store service-id->failed-instances-transient-store
                            :service-id->password-fn service-id->password-fn
                            :service-id->service-description-fn service-id->service-description-fn
                            :watch-state watch-state}
          scheduler (map->KubernetesScheduler scheduler-config)
          _ (deliver scheduler-promise scheduler)
          pod-watch-thread (start-pods-watch! scheduler watch-options)
          rs-watch-thread (start-replicasets-watch! scheduler watch-options)]
      (reset! daemon-state {:pod-watch-daemon pod-watch-thread
