从 ~empty AWS 账户开始,我正在尝试关注https://docs.aws.amazon.com/eks/latest/userguide/getting-started.html
这意味着我创建了一个 VPS 堆栈,然后安装了 aws-iam-authenticator、awscli 和 kubectl,然后创建了一个具有编程访问权限和直接附加 AmazonEKSAdminPolicy 的 IAM 用户。
然后我使用该网站创建了我的 EKS 集群并用于aws configure设置我的 IAM 用户的访问密钥和秘密。
aws eks update-kubeconfig --name wr-eks-cluster工作正常,但是:
kubectl get svc
error: the server doesn't have a resource type "svc"
无论如何,我继续创建我的工作节点堆栈,现在我处于死胡同:
kubectl apply -f aws-auth-cm.yaml
error: You must be logged in to the server (the server has asked for the client to provide credentials)
aws-iam-authenticator token -i <my cluster name>似乎工作正常。
我似乎缺少的是,当您创建集群时,您指定了一个 IAM 角色,但是当您创建用户(根据指南)时,您附加了一个策略。我的用户应该如何访问该集群?
或者最终,我如何继续使用 kubectl 访问我的集群?