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년 전534회 조회
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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠