fmt.Printf("[preflight] WARNING: unable to start the kubelet service: [%v]\n",err)
fmt.Printf("[preflight] please ensure kubelet is reloaded and running manually.\n")
}
}
// TryStopKubelet attempts to bring down the kubelet service momentarily
funcTryStopKubelet(){
// If we notice that the kubelet service is inactive, try to start it
initSystem,err:=initsystem.GetInitSystem()
iferr!=nil{
fmt.Println("[preflight] no supported init system detected, won't make sure the kubelet not running for a short period of time while setting up configuration for it.")
return
}
if!initSystem.ServiceExists("kubelet"){
fmt.Println("[preflight] couldn't detect a kubelet service, can't make sure the kubelet not running for a short period of time while setting up configuration for it.")
}
// This runs "systemctl daemon-reload && systemctl stop kubelet"
fmt.Printf("[preflight] WARNING: unable to start the kubelet service: [%v]\n",err)
fmt.Printf("[preflight] please ensure kubelet is reloaded and running manually.\n")
}
}
// TryStopKubelet attempts to bring down the kubelet service momentarily
funcTryStopKubelet(){
// If we notice that the kubelet service is inactive, try to start it
initSystem,err:=initsystem.GetInitSystem()
iferr!=nil{
fmt.Println("[preflight] no supported init system detected, won't make sure the kubelet not running for a short period of time while setting up configuration for it.")
return
}
if!initSystem.ServiceExists("kubelet"){
fmt.Println("[preflight] couldn't detect a kubelet service, can't make sure the kubelet not running for a short period of time while setting up configuration for it.")
}
// This runs "systemctl daemon-reload && systemctl stop kubelet"