Nogweii

How do get the root CA public key from Kubernetes

Q: I have access to my kubernetes cluster, but I want to verify the public
key used to access the API server. How do I retrieve the current CA’s public
key to do the verification?

A:

kubectl get cm kube-root-ca.crt -o jsonpath="{['data']['ca\.crt']}

Will get the public key as a PEM certificate. You probably want to pipe it to
base64 -w0 to encode it in the way the kubeconfig file expects.

Useful links