<p>export K8s cluster CA cert and CA private key</p>

<p>Team, I have a Kubernetes cluster running. I will be deleting and creating it again and again so I want to reuse the same CA cert all the time for which I need to save the CA cert and key to create secret as below </p>

<pre><code>create secret keypair ca --cert ${CACRT} --key ${CAKEY} --name ${NAME}
</code></pre>

<p>Need path to the cert and key and also kops command to export them.</p>

<p>I'm not really sure what you are trying to accomplish with the <code>create secret keypair ca...</code> command, but you can get these right out of one of the Kubernetes masters (or master if you have one).</p>

<pre><code>$ ssh user@kubernetesmaster
</code></pre>

<p>Then:</p>

<pre><code>$ cat /etc/kubernetes/pki/ca.crt
...
$ cat /etc/kubernetes/pki/ca.key
</code></pre>

<p>Note that <code>etcd</code> usually uses a different CA. You can find it under:</p>

<pre><code>/etc/kubernetes/pki/etcd
</code></pre>
