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.
get-token
--cluster-name <value>
[--role-arn <value>]
--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.
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": "client.authentication.k8s.io/v1beta1",
"spec": {},
"status": {
"expirationTimestamp": "2019-08-14T18:44:27Z",
"token": "k8s-aws-v1EXAMPLE_TOKEN_DATA_STRING..."
}
}