Improve error message when user provide invalid certificate key

parent 6f6890b0
...@@ -89,7 +89,7 @@ func UploadCerts(client clientset.Interface, cfg *kubeadmapi.InitConfiguration, ...@@ -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) fmt.Printf("[upload-certs] Storing the certificates in Secret %q in the %q Namespace\n", kubeadmconstants.KubeadmCertsSecret, metav1.NamespaceSystem)
decodedKey, err := hex.DecodeString(key) decodedKey, err := hex.DecodeString(key)
if err != nil { if err != nil {
return err return errors.Wrap(err, "error decoding certificate key")
} }
tokenID, err := createShortLivedBootstrapToken(client) tokenID, err := createShortLivedBootstrapToken(client)
if err != nil { if err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment