Tus*_* De 1 amazon-web-services amazon-eks
我正在尝试设置 aws EKS 集群并希望从我的本地 Windows 工作站连接该集群。无法连接。这是我做的步骤;
Command:kubectl.exe get svc
Run Code Online (Sandbox Code Playgroud)
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
Run Code Online (Sandbox Code Playgroud)
不知道这里有什么错误的设置。有人可以帮忙吗?我知道有些地方说您必须使用相同的 aws 用户来连接集群 (EKS)。但是我怎样才能获得 aws 分配角色的访问密钥和令牌(步骤#2:eks-role-1)?
对于进入此领域的人,您可能会为 eks 提供个人资料。
EKS 不会在 kubeconfig 中添加配置文件。
解决方案:
$ export AWS_ACCESS_KEY_ID=xxxxxxxxxxxxx
$ export AWS_SECRET_ACCESS_KEY=ssssssssss
Run Code Online (Sandbox Code Playgroud)
$ export AWS_PROFILE=ppppp
Run Code Online (Sandbox Code Playgroud)
users:
- name: eks # This depends on your config.
user:
exec:
apiVersion: client.authentication.k8s.io/v1alpha1
command: aws-iam-authenticator
args:
- "token"
- "-i"
- "general"
env:
- name: AWS_PROFILE
value: "<YOUR_PROFILE_HERE>" #
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5496 次 |
| 最近记录: |