kubeadm swallows errors when CA key isn't in RSA format #1210
Labels
kind/bug
Categorizes issue or PR as related to a bug.
priority/important-soon
Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
What happened: When trying to deploy Kubernetes using kubeadm v1.12.1, kubeadm failed to generate certificates, causing it to fail at a later step.
After passing
-v10
to get all the logs I could I found that it was expecting all the certificates to have been pre-made, even though I only added the certificate and key for the certificate authority. So I dug into the code, and inpkiutil.TryLoadKeyFromDisk
I found this:It turns out all the PKI I've been generating for things like etcd has been ECDSA. So I found the issue I was having, but I still couldn't figure out why kubeadm wasn't failing right away. I took a look at the caller of that function:
It looks like that original error is swallowed.
What you expected to happen: Immediate failure when keys are in the wrong format.
How to reproduce it (as minimally and precisely as possible): Use an ECDSA cert/key pair and run
kubeadm init
.Anything else we need to know?:
Environment:
kubectl version
): v1.12.1uname -a
): 4.15.0-34-generic discuss the meaning of kubeadm init --api-advertise-addresses #37-Ubuntu SMP Mon Aug 27 15:21:48 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux/kind bug
The text was updated successfully, but these errors were encountered: