0

When we setup a kubernetes master using kubeadm init . At the end of the procedure we have to copy the /etc/kubernetes/admin.conf to $home/.kube/config .

When I opened the file , I found the below details .

  • certificate authority data
  • client certificate data
  • client key data

I am aware the file is used for authentication when we try to access cluster using kubectl .

What I am trying to understand is from where these details are generated ? .

Bala
  • 1,077
  • 5
  • 15
  • 35
  • How you got your client cert/key depends on how you provisioned your cluster. In this case it's kubeadm giving these client certs to you. – ahmet alp balkan Jan 23 '19 at 21:34

1 Answers1

2

You have two options - Use the automatically generated certificates if you have installed k8s with kubeadm - Create your own certificates.

Once you have the certificates, you can follow these steps to manually configure them https://kubernetes.io/docs/setup/certificates/#configure-certificates-manually To create your own CA certificates, there are many google links and here is one for your reference. http://pages.cs.wisc.edu/~zmiller/ca-howto/ If you are new to this, I would suggest you start with "A Single-level CA"

ahmet alp balkan
  • 42,679
  • 38
  • 138
  • 214
Sushant Sonker
  • 132
  • 1
  • 5