【发布时间】:2019-07-27 01:45:33
【问题描述】:
我正在尝试设置 aws EKS 集群并希望从我的本地 Windows 工作站连接该集群。无法连接。这是我做的步骤;
- 创建 aws 服务角色(aws 控制台 -> IAM -> 角色 -> 单击“创建角色”-> 选择 AWS 服务角色“EKS” -> 赋予角色名称“eks-role-1”
- 在 IAM 中创建另一个名为“eks”的用户以进行编程访问。这将帮助我从本地 Windows 工作站连接我的 EKS 集群。我添加到其中的策略是“AmazonEKSClusterPolicy”、“AmazonEKSWorkerNodePolicy”、“AmazonEKSServicePolicy”、“AmazonEKS_CNI_Policy”。
- 已使用在步骤#1 中创建的 roleARN 创建了下一个 EKS 集群。最后,在 aws 控制台中创建了 EKS 集群。
- 在我的本地 Windows 工作站中,我下载了“kubectl.exe”和“aws-iam-authenticator.exe”,并使用第 2 步中的 accesskey 和令牌为用户“eks”进行了“aws 配置”。配置“~/.kube/config”后;我运行下面的命令并得到这样的错误:
Command:kubectl.exe get svc
output:
could not get token: NoCredentialProviders: no valid providers in chain. Deprecated.
For verbose messaging see aws.Config.CredentialsChainVerboseErrors
could not get token: NoCredentialProviders: no valid providers in chain. Deprecated.
For verbose messaging see aws.Config.CredentialsChainVerboseErrors
could not get token: NoCredentialProviders: no valid providers in chain. Deprecated.
For verbose messaging see aws.Config.CredentialsChainVerboseErrors
could not get token: NoCredentialProviders: no valid providers in chain. Deprecated.
For verbose messaging see aws.Config.CredentialsChainVerboseErrors
could not get token: NoCredentialProviders: no valid providers in chain. Deprecated.
For verbose messaging see aws.Config.CredentialsChainVerboseErrors
Unable to connect to the server: getting credentials: exec: exit status 1
不确定这里的设置有什么问题。有人可以帮忙吗?我知道有些地方说您必须使用相同的 aws 用户来连接集群(EKS)。但是我怎样才能获得 aws assign-role 的 accesskey 和 token(步骤 2:eks-role-1)?
【问题讨论】:
标签: amazon-web-services amazon-eks