Skip to content

Instantly share code, notes, and snippets.

@SaMnCo
Created February 23, 2018 11:37
Show Gist options
  • Save SaMnCo/ebe8e4fb6ca71907fab13e00d6e3c58a to your computer and use it in GitHub Desktop.
Save SaMnCo/ebe8e4fb6ca71907fab13e00d6e3c58a to your computer and use it in GitHub Desktop.
# Create the SA
$ kubectl create sa custom-metrics-apiserver
serviceaccount "custom-api-server" created
# Extract the secret name for the token
$ export CMA_TOKEN_SECRET=$(kubectl get sa custom-api-server -o jsonpath='{.secrets[0].name}')
# Extract the auth token
$ export CMA_TOKEN=$(kubectl get secret custom-api-server-token-hj4qz -o jsonpath='{.data.token}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment