get-token — AWS CLI 2.0.33 Command Reference
Description¶
Get a token for authentication with an Amazon EKS cluster. This can be used as an alternative to the aws-iam-authenticator.
See ‘aws help’ for descriptions of global parameters.
Synopsis¶
get-token--cluster-name <value>[--role-arn <value>]
Options¶
--cluster-name (string)
Specify the name of the Amazon EKS cluster to create a token for.
--role-arn (string)
Assume this role for credentials when signing the token.
See ‘aws help’ for descriptions of global parameters.
Examples¶
To get a cluster authentication token
This example command gets an authentication token for a cluster named example.
Command:
aws eks get-token --cluster-name example
Output:
{ "kind": "ExecCredential", "apiVersion": "", "spec": {}, "status": { "expirationTimestamp": "2019-08-14T18:44:27Z", "token": "k8s-aws-v1EXAMPLE_TOKEN_DATA_STRING..." }}