mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
Merge pull request #77768 from yagonobre/upload-certs
Improve error message when user provide invalid certificate key
This commit is contained in:
commit
f5a1ceb1fc
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user