Kubelet Startup - Command Execution
In the previous analysis, we explored the initialization of kubelet’s command-line. Now, we will delve into the execution of kubelet’s Cobra Command. The Execute()
function in Cobra essentially involves command-line parsing (unless DisableFlagParsing: true
is set), followed by passing the remaining arguments to the Command.Run
function for execution.
This analysis is based on Kubernetes version 1.18.6. For the source code and related readings, please visit the source code analysis repository.