Converting certificate files to certificate data fields
Hava does not support accessing external files within your kubeconfig for authentication using client certificates. Luckily, it's a simple process to convert these to data fields that can be entered directly into your configuration.
The fields that will need to be converted are:
certificate-authorityto becomecertificate-authority-dataclient-certificateto becomeclient-certificate-dataclient-keyto becomeclient-key-data
Finding and converting the files
For this example we have the following kubeconfig using local certificates files.
apiVersion: v1
kind: Config
preferences: {}
clusters:
- cluster:
certificate-authority: /Users/example/ca.crt
server: https://kubeserver:8443
name: kube
contexts:
- context:
cluster: kube
user: kube
name: kube
users:
- name: kube
user:
client-certificate: /Users/example/client.crt
client-key: /Users/example/client.keyFor each of these external files we need to convert them to base64 and then update the configuration with the base64 string.
Here's an example using the certificate authority file:
Linux and MacOS
cat /Users/example/ca.crt | base64
Windows
certutil -f -encode "c:/Users/example/ca.crt" "output-file"
Update the config to use the new values
Once you've got the base64 data for all 3 values you can update the config file.
Your configuration is now ready to import into Hava to connect and display your Kubernetes clusters!
Last updated
Was this helpful?
