Created
May 10, 2019 01:38
-
-
Save SocketWeaver/167d7d1f1d58b2ae01cab03e3cad721b to your computer and use it in GitHub Desktop.
prepare CA cert and token
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# list all secrets | |
kubectl --kubeconfig="kubeconfig.yaml" -n kube-system get secret | |
# find the secret for the service account we created before and output its CA certificate | |
# In our case, its name should start with socketweaverSA-token-* | |
# Add the output of the follow command as the STAGING_LOBBY_CLUSTER_CA pipeline variable | |
kubectl -kubeconfig="kubeconfig.yaml" -n kube-system get secret socketweaverSA-token-xxxxx -o jsonpath="{['data']['ca\.crt']}" | |
# Add the output of the follow command as the STAGING_CLUSTER_SA_TOKEN pipeline variable | |
kubectl --kubeconfig="kubeconfig.yaml" -n kube-system get secret socketweaverSA-token-xxxxx -o jsonpath="{['data']['token']}" | base64 --decode | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment