首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >"eksctl创建群集“命令无法工作。

"eksctl创建群集“命令无法工作。
EN

Stack Overflow用户
提问于 2022-09-30 23:04:40
回答 1查看 174关注 0票数 0

在执行此命令时,我得到以下错误:

代码语言:javascript
复制
C:\WINDOWS\system32>eksctl create cluster --name eksctl-demo --profile myAdmin2
Error: checking AWS STS access – cannot get role ARN for current session: operation error STS: GetCallerIdentity, failed to sign request: failed to retrieve credentials: failed to refresh cached credentials, no EC2 IMDS role found, operation error ec2imds: GetMetadata, request send failed, Get "http://169.254.169.254/latest/meta-data/iam/security-credentials/": dial tcp 169.254.169.254:80: i/o timeout

myAdmin2 IAM用户可信度设置如下:

凭据文件:

代码语言:javascript
复制
[myAdmin2] 
aws_access_key_id = ******************
aws_secret_access_key = ********************

配置文件:

代码语言:javascript
复制
[profile myAdmin2]
region = us-east-2
output = json

myAdmin2可以访问控制台:

代码语言:javascript
复制
C:\WINDOWS\system32>aws iam list-users --profile myAdmin2
{
    "Users": [
        {
            "Path": "/",
            "UserName": "myAdmin",
            "UserId": "AIDAYYPFV776ELVEJ5ZVQ",
            "Arn": "arn:aws:iam::602313981948:user/myAdmin",
            "CreateDate": "2022-09-30T19:08:08+00:00"
        },
        {
            "Path": "/",
            "UserName": "myAdmin2",
            "UserId": "AIDAYYPFV776LEDK2PCCI",
            "Arn": "arn:aws:iam::602313981948:user/myAdmin2",
            "CreateDate": "2022-09-30T21:39:33+00:00"
        }
    ]
}

我在使用myAdmin时遇到了问题,这就是为什么我创建了一个名为myAdmin2的新IAM用户。myAdmin2被授予AdministratorAccess权限:如图所示

安装了aws cli版本:

代码语言:javascript
复制
C:\WINDOWS\system32>aws --version
aws-cli/2.7.35 Python/3.9.11 Windows/10 exe/AMD64 prompt/off

我的环境变量:

代码语言:javascript
复制
C:\WINDOWS\system32>set

AWS_ACCESS_KEY_ID= ***********the same as I have in credentials file
AWS_CONFIG_FILE=~/.aws/config
AWS_DEFAULT_PROFILE=myAdmin2
AWS_DEFAULT_REGION=us-east-2
AWS_PROFILE=myAdmin2
AWS_SECRET_ACCESS_KEY=****************the same as I have in credentials file
AWS_SHARED_CREDENTIALS_FILE=~/.aws/credentials

我想这些都是我必须提到的。如果有人能帮忙,请。我不能再犯这个错误了!

EN

回答 1

Stack Overflow用户

发布于 2022-10-01 09:28:24

终于成功了!一切都配置良好,我只需重新启动我的笔记本电脑,它就解决了这个问题!

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73914690

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档