Open Rizbe opened 7 years ago
I assume this is self signed?
More readable version of your command line:
./check-kube-nodes-ready.rb \
-s https://IP:port/api/ \
--token-file /etc/kubernetes/token \
--ca-file /etc/kubernetes/cacert.pem \
--key /etc/kubernetes/ca-key.pub \
--cert /etc/kubernetes/ca.pub
First, you should be using either --cert
and --key
or --token-file
, not both. Kubernetes authentication options are documented here: https://kubernetes.io/docs/admin/authentication/ --cert
and --key
are for X509 Client Cert auth, and --token-file
is for Static Token File auth.
When using --key
, you need to provide the private key associated with the cert, not the public key. And then, that will only work if the apiserver is configured correctly with the --client-ca-file
option.
Finally, I don't think you want the /api
URL on the end of your apiserver in this call. You should have scheme, host, and port there.
@Rizbe does that help?
Converted my SSL certs using; openssl x509 -pubkey -noout -in ca.pem > ca.pub
Running Ubuntu 14:04 with Sensu 28.2