【发布时间】:2022-11-14 10:08:28
【问题描述】:
我正在研究 EKS(AWS 管理的 Kubernetes),每当我尝试使用 kubectl 时,我都会收到此消息。 到目前为止我为配置我的配置所做的工作:
-
我已经设置了上下文
kubectl 配置集上下文 arn:aws:eks:eu-west-1:myaccountid:cluster/myclustername
-
我已经切换到这个上下文
kubectl 配置使用上下文 arn:aws:eks:eu-west-1:myaccountid:cluster/myclustername
-
验证我确实在正确的上下文中
kubectl 配置获取上下文
收到了我当前集群的 arn 而且,是的,我已经完成了
aws eks update-kubeconfig --name <EKS_Cluster_Name> --region <Region_Name>但是当我尝试使用最简单的命令时,例如kubectl cluster-info dump或任何其他 kubectl 命令,我都会收到
Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.或者
The connection to the server localhost:8080 was refused - did you specify the right host or port?如果上下文设置为特定集群,为什么它会尝试连接到本地主机?我该如何纠正这个问题?
【问题讨论】:
标签: amazon-eks