NewMainKubelet
kubelet源码分析(二)之 NewMainKubelet
// NewMainKubelet instantiates a new Kubelet object along with all the required internal modules.
// No initialization of Kubelet and its modules should happen here.
func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration,
kubeDeps *Dependencies,
crOptions *config.ContainerRuntimeOptions,
containerRuntime string,
runtimeCgroups string,
hostnameOverride string,
nodeIP string,
providerID string,
cloudProvider string,
certDirectory string,
rootDirectory string,
registerNode bool,
registerWithTaints []api.Taint,
allowedUnsafeSysctls []string,
remoteRuntimeEndpoint string,
remoteImageEndpoint string,
experimentalMounterPath string,
experimentalKernelMemcgNotification bool,
experimentalCheckNodeCapabilitiesBeforeMount bool,
experimentalNodeAllocatableIgnoreEvictionThreshold bool,
minimumGCAge metav1.Duration,
maxPerPodContainerCount int32,
maxContainerCount int32,
masterServiceNamespace string,
registerSchedulable bool,
nonMasqueradeCIDR string,
keepTerminatedPodVolumes bool,
nodeLabels map[string]string,
seccompProfileRoot string,
bootstrapCheckpointPath string,
nodeStatusMaxImages int32) (*Kubelet, error) {
...
} 1.1. PodConfig
1.1.1. makePodSourceConfig
1.1.2. NewPodConfig
1.1.3. NewSourceApiserver
1.2. Lister
1.2.1. serviceLister
1.2.2. nodeLister
1.3. 各种Manager
1.3.1. containerRefManager
1.3.2. oomWatcher
1.3.3. dnsConfigurer
1.3.4. secretManager & configMapManager
1.3.5. livenessManager
1.3.6. podManager
1.3.7. resourceAnalyzer
1.3.8. containerGC
1.3.9. imageManager
1.3.10. statusManager
1.3.11. probeManager
1.3.12. tokenManager
1.3.13. volumePluginMgr
1.3.14. volumeManager
1.3.15. evictionManager
1.4. containerRuntime
1.4.1. NewDockerService
1.4.2. NewDockerServer
1.4.3. DockerServer.Start
1.5. podWorker
1.5.1. PodWorkers接口
2. 总结
最后更新于