问题原文
原帖链接 · Kurt Mueller · CC BY-SA 4.0
Whenever I run the following command with the role that that was used to create the eks cluster...
aws eks update-kubeconfig --name eks-cluster --role-arn arn:aws:iam::999999999999:role/eksServiceRole
... I get the following error:
An error occurred (AccessDeniedException) when calling the DescribeCluster operation: User: arn:aws:iam::111111111111:user/username is not authorized to perform: eks:DescribeCluster on resource: arn:aws:eks:us-east-1:561353845098:cluster/eks-cluster
Does anybody have any advice on how to go about diagnosing and rectifying this error?
社区高分解答
原帖链接 · William Sandin · CC BY-SA 4.0
A couple of suggestions that may, or may not help:
You may include
--verboseto your command to perhaps get better details as to where it fails. Could it be that case that the user you are authenticated as are not able to assume the role specified?In the manual for aws-cli
--role-arnis passed as a string, you should try to encapsulate it with double-quotes:
aws eks update-kubeconfig --name eks-cluster --role-arn "arn:aws:iam::999999999999:role/eksServiceRole"
Try to manually assume the role through aws-cli.
Verify your current authenticated session:
aws sts get-caller-identityAttempt to assume the role:
aws sts assume-role --role-arn "arn:aws:iam::999999999999:role/eksServiceRole" --role-session-name test-eks-role
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
