jitender chand:
Hi Guys,
I am really confused on setting up the CA and generating the certification for client and server. I came across one article where they state example how can we CURL kube api server by sending the certificate along with the API.
curl $KUBE_API/apis/apps/v1/deployments \
--cacert ~/.minikube/ca.crt \
--cert ~/.minikube/profiles/cluster1/client.crt \
--key ~/.minikube/profiles/cluster1/client.key
What is confusing for me in above example that,
-
why we are sending the private key
client.keyof client along with the curl request. Wouldn’t that be a security risk -
why we are sending
ca.crtalong with the API. what is role of this here. As per my understanding Kube API server already had access toca.crtandca.keyin order to decode theclient.crt
My understand was,client.crtwould be enough to get the result. since it was signed by Cluster CA. I am comparing it to how normal HTTPS would work in the browser. lets take a example of http://youtube.com|youtube.com. -
First browser will validate the certification whether issued by Authorized company
-
Second browser will encrypt all outgoing information with this certification.
Can someone please help me here to understand this?