Improve error message when user provide invalid certificate key

This commit is contained in:
Yago Nobre 2019-05-11 00:50:50 -03:00
parent 6f6890b09e
commit 54a308bdd7
No known key found for this signature in database
GPG Key ID: 75E01A69D4DEE54C

View File

@ -89,7 +89,7 @@ func UploadCerts(client clientset.Interface, cfg *kubeadmapi.InitConfiguration,
fmt.Printf("[upload-certs] Storing the certificates in Secret %q in the %q Namespace\n", kubeadmconstants.KubeadmCertsSecret, metav1.NamespaceSystem)
decodedKey, err := hex.DecodeString(key)
if err != nil {
return err
return errors.Wrap(err, "error decoding certificate key")
}
tokenID, err := createShortLivedBootstrapToken(client)
if err != nil {