Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/kubernetes/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon web services 无法将-f应用于我的EKS群集:访问被拒绝(根帐户不能担任角色)_Amazon Web Services_Kubernetes_Amazon Iam_Amazon Eks - Fatal编程技术网

Amazon web services 无法将-f应用于我的EKS群集:访问被拒绝(根帐户不能担任角色)

Amazon web services 无法将-f应用于我的EKS群集:访问被拒绝(根帐户不能担任角色),amazon-web-services,kubernetes,amazon-iam,amazon-eks,Amazon Web Services,Kubernetes,Amazon Iam,Amazon Eks,我在AWS EKS上创建了Kubernetes群集,现在我正尝试使用cmd部署一个应用程序: kubectl apply -f deployment.yaml 但我得到了一个错误: An error occurred (AccessDenied) when calling the AssumeRole operation: Roles may not be assumed by root accounts. Unable to connect to the server: getting cr

我在AWS EKS上创建了Kubernetes群集,现在我正尝试使用cmd部署一个应用程序:

kubectl apply -f deployment.yaml
但我得到了一个错误:

An error occurred (AccessDenied) when calling the AssumeRole operation: Roles may not be assumed by root accounts.
Unable to connect to the server: getting credentials: exec: executable aws failed with exit code 254
我是AWS和EKS的新手,当我在谷歌做一些研究时,它说这可能是由
AWS
cli工具中经过身份验证的用户造成的

有关信息,my cli与名为aws\u cli\u user的用户连接,该用户具有
AdministratorAccess
策略

为了创建k8s集群,我创建了一个名为ekssoclusterrole的角色,该角色拥有
AmazonEKSClusterPolicy


我想我缺少了一些链接角色和用户的东西,这样它就可以将内容正确地推送到集群了

一,。请分享你创建eks clusted2的步骤。看到了吗?没有帮助调查吗?1.实际上,我使用AWS仪表板(UI)创建了集群,然后使用了
AWS eks--区域更新kubeconfig--name cluster\u name
,因此我可以更改
kubectl
上下文以使用新创建的集群。您需要使用创建集群时使用的相同用户/角色访问集群。这很重要,因为最初只有创建者是内部唯一的管理集群。如果使用角色创建,请将
--role arn
添加到
aws eks--区域更新kubeconfig--name cluster_name
正手