Advertisement
Guest User

Untitled

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