I am setting up Vault in Kubernetes and enabling the Kubernetes Auth method. It needs the Kubernetes CA Certificate. How do I obtain that? I couldn't find much on duckduckgo's search results.
Running kubernetes inside Docker for mac on MacOS Mojave:
This can be found in your kube-system
(or any other) namespace by running the following on your default-token
secret:
kubectl get secret <secret name> -n <namespace> -o jsonpath="{['data']['ca\.crt']}" | base64 --decode
To find the secret name
run kubectl get secret -n kube-system
and find the secret that starts with default-token
.
This will give you something like:
-----BEGIN CERTIFICATE-----
XXXXXXX
XXXX....
-----END CERTIFICATE-----
When you are entering this certificate, make sure to enter the BEGIN and END header and footer.