Is this a BUG REPORT or FEATURE REQUEST?: It's a question
Minikube version: v0.10.0
Environment:
xhyve
1.11.1, build 5604cbe
What happened:
I'm unable to access Kubernetes API via CURL. It says curl: (58) SSL: Can't load the certificate "cert.pem" and its private key: OSStatus -25299
What you expected to happen:
To get response from API server.
How to reproduce it (as minimally and precisely as possible):
Use address to your Kubernetes API server here
curl https://192.168.64.4:8443/apis --key /Users/$USER/.minikube/certs/ca-key.pem --cert /Users/$USER/.minikube/certs/cert.pem --cacert /Users/$USER/.minikube/certs/ca.pem --cert-type PEM
I found out that I was using wrong certificates and the SSL: Can't load the certificate [] and its private key: OSStatus -25299
is a problem specific to CURL in OS X Mavericks+ where CURL accepts certificates of only P12 format.
You have to use certificates in $HOME/.minikube/
directory instead $HOME/.minikube/certs
. You also have to convert the certificates into P12 format and then use them.
Look at this issue https://github.com/curl/curl/issues/283, there @JohnMorales shows a way to convert the certificate in the appropriate format to work in macos.
This guide also seems to be nice to know: https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/#without-kubectl-proxy-post-v13x
Most helpful comment
I found out that I was using wrong certificates and the
SSL: Can't load the certificate [] and its private key: OSStatus -25299
is a problem specific to CURL in OS X Mavericks+ where CURL accepts certificates of only P12 format.You have to use certificates in
$HOME/.minikube/
directory instead$HOME/.minikube/certs
. You also have to convert the certificates into P12 format and then use them.