I am new to kubernetes, I have configured kubernetes on centos machine and executed following command.
sudo /usr/bin/kube-apiserver --secure-port=8081 --logtostderr=true --v=0 --etcd-servers=http://127.0.0.1:2379 --address=0.0.0.0 --port=8083 --kubelet-port=10250 --allow-privileged=false --service-cluster-ip-range=10.254.0.0/16 --admission-control=SecurityContextDeny --token-auth-file=/tmp/tokens.csv --client-ca-file=/var/run/kubernetes/ca.crt --tls-private-key-file=/var/run/kubernetes/server.key --tls-cert-file=/var/run/kubernetes/server.crt
When I try - curl -X POST -H Content-Type:application/json --cacert ca.crt -H "Authorization: Bearer jhuTOKEN1234" -d @"C:\Users\test\Desktop\newpod.json" https://<ip>:8081/api/v1/namespaces/default/nodes
I get following error
curl: (77) error setting certificate verify locations: CAfile: ca.crt CApath: none
And on API Server console I get following error message http: TLS handshake error from 28.151.167.246:56749: EOF
Any help? Am I running kube-apiserver with wrong values?
it seems that you haven't put your certs
in proper directories if placed, they haven't mentioned properly. Please check once again, otherwise no issue with commands