大网数据广告活动
服务器运维问答

AWS EKS update-kubeconfig does not respect --role-arn flag

· 52CE 我爱测

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 erro…

问题原文

原帖链接 · 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 --verbose to 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-arn is 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.

    1. Verify your current authenticated session: aws sts get-caller-identity

    2. Attempt to assume the role: aws sts assume-role --role-arn "arn:aws:iam::999999999999:role/eksServiceRole" --role-session-name test-eks-role

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2019-01-03)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。