Skip to content

Instantly share code, notes, and snippets.

@SocketWeaver
Created May 10, 2019 01:38
Show Gist options
  • Save SocketWeaver/167d7d1f1d58b2ae01cab03e3cad721b to your computer and use it in GitHub Desktop.
Save SocketWeaver/167d7d1f1d58b2ae01cab03e3cad721b to your computer and use it in GitHub Desktop.
prepare CA cert and token
# 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