What is the difference between iam-aws-authenticator and aws eks get-token?

0

These two command both generate tokens to login to EKS

  • AWS_PROFILE=MYPROFILE aws eks get-token --cluster-name myclustername | jq -r '.status.token'
  • AWS_PROFILE=MYPROFILE aws-iam-authenticator -i myclustername token --token-only

I can use the aws eks get-token with kubectl no problem but I can't use that token to login to kubernetes-dashboard.
But I can use the aws-iam-authenticator token to login to kubernetes-dashboard.

I thought both tokens just identify me as arn:aws:iam::111111111:user/username but there must be some difference.

So what are the differences? or how I can troubleshoot this? Is there any command can show what the token authenticates to?

已提问 3 年前538 查看次数
1 回答
0

Never mind, I didn't realize that I spelled the name of the cluster wrong in the aws eks get-token --cluster-name xxxxx.

The tokens generated by both commands are valid credentials to login to kubernetes-dashboard and kubectl

The command will not complaint if you provide a non-existing cluster name.

已回答 3 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则