Skip to content

Instantly share code, notes, and snippets.

@chenchun
Last active July 30, 2018 07:38
Show Gist options
  • Save chenchun/1d6f5d9990382dcf489466af8a66a716 to your computer and use it in GitHub Desktop.
Save chenchun/1d6f5d9990382dcf489466af8a66a716 to your computer and use it in GitHub Desktop.
kubernetes kubelet component #kubernetes #kubelet

kubelet

Component

Ordered by the goroutine start time

  • eventBroadcaster
  • Watching apiserver
  • garbageCollection(containerGC/imageManager)
  • imageManager
  • containerManager
  • oomWatcher
  • resourceAnalyzer //Monitor resource usage
  • volumeManager
  • syncNodeStatus
  • syncNetworkStatus
  • cadvisor
  • podKiller
  • statusManager //status.Manager is the Source of truth for kubelet pod status
  • probeManager
  • evictionManager // Needed to observe and respond to situations that could impact node stability
  • pleg // The pod lifecycle event generator.
  • podWorkers
  • syncLoop //syncLoop is the main loop for processing changes. It watches for changes from three channels (file, apiserver, and http) and creates a union of them.

The process of launching a pod

  1. Watching apiserver //NewSourceApiserver creates a config source that watches and pulls from the apiserver.
  2. kl.syncLoopIteration
  3. kl.HandlePodAdditions
  4. kl.podWorkers.UpdatePod
  5. kl.syncPod //syncPod is the transaction script for the sync of a single pod.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment