How do I get the certificate authority certificate/key from a cluster created by kops? How do I get the certificate authority certificate/key from a cluster created by kops? kubernetes kubernetes

How do I get the certificate authority certificate/key from a cluster created by kops?


I found out that kops stores the CA key and certificate in its S3 bucket, so you can download said files like so:

aws s3 cp s3://$BUCKET/$CLUSTER/pki/private/ca/$KEY.key ca.keyaws s3 cp s3://$BUCKET/$CLUSTER/pki/issued/ca/$CERT.crt ca.crt

You need to determine the S3 bucket used by kops (i.e. $BUCKET), the name of your cluster ($CLUSTER) and the filenames of the .key and .crt files will be random.