Skip to content

Instantly share code, notes, and snippets.

@superseb
Last active January 8, 2019 15:01
Show Gist options
  • Save superseb/d35c5f1521bc9ed2f8044fd87a03bf63 to your computer and use it in GitHub Desktop.
Save superseb/d35c5f1521bc9ed2f8044fd87a03bf63 to your computer and use it in GitHub Desktop.
rancher_create_kubernetes_token.sh
curl 'http://<rancher_server_ip>/v2-beta/apikey' -H 'content-type: application/json' --data-binary '{"type":"apiKey","accountId":"1a1","name":"kubectl","description":"Provides workstation access to kubectl"}' --compressed | jq -r '.publicValue + ":" + .secretValue' | base64 | tr /+ _- | tr -d =
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment