Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Dump certs (client.crt, client.key, & ca.crt) in a directory called c3certs
- export KUBECONFIG_PATH=/home/ec2-user/.kube/config
- sudo cat $KUBECONFIG_PATH | grep client-certificate-data | cut -f2 -d : | tr -d ' ' | base64 -d > c3certs/client.crt
- sudo cat $KUBECONFIG_PATH | grep client-key-data | cut -f2 -d : | tr -d ' ' | base64 -d > c3certs/client.key
- sudo cat $KUBECONFIG_PATH | grep certificate-authority-data | cut -f2 -d : | tr -d ' ' | base64 -d > c3certs/ca.crt
- # Load the above certificates as ConfigMap in Kubernetes running with CoreNS Kubernetai plugin
- kubectl -n kube-system create cm c3certs --from-file=/home/ec2-user/c3certs
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement