kubeadm: Make exec error message more informative

This commit is contained in:
Daniel Lipovetsky 2019-01-29 16:38:35 -08:00
parent bb9a12d6f8
commit 4fe0d2107d

View File

@ -33,7 +33,7 @@ func GetKubeletVersion(execer utilsexec.Interface) (*version.Version, error) {
command := execer.Command("kubelet", "--version")
out, err := command.CombinedOutput()
if err != nil {
return nil, err
return nil, errors.Wrap(err, "cannot execute 'kubelet --version'")
}
cleanOutput := strings.TrimSpace(string(out))