0

我已经使用 terraform 设置了 EKS 集群和工作节点,它们都在工作,但是,当我尝试按照 AWS 上的文档在集群上部署 K8S 仪表板时:https ://docs.aws.amazon.com /eks/latest/userguide/dashboard-tutorial.html

当我尝试访问 localhost:8001 时出现以下错误

{
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {

  },
  "status": "Failure",
  "message": "no endpoints available for service \"kubernetes-dashboard\"",
  "reason": "ServiceUnavailable",
  "code": 503
}

当我访问 pod 信息时,这就是我得到的:

在此处输入图像描述

我注意到 Kubernetes-dashboard pod 卡在 ContainerCreating 状态。

我还检查了 K8s Dashboard pod 信息

Events:
  Type     Reason                  Age                      From                                  Message
  ----     ------                  ----                     ----                                  -------
  Warning  FailedCreatePodSandBox  13m (x4385 over 103m)    kubelet, ip-10-0-102-53.ec2.internal  Failed create pod sandbox: rpc error: code = Unknown desc = NetworkPlugin cni failed to set up pod "kubernetes-dashboard-65c76f6c97-kgmmr_kube-system" network: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp 127.0.0.1:50051: connect: connection refused"
  Normal   SandboxChanged          3m34s (x4880 over 103m)  kubelet, ip-10-0-102-53.ec2.internal  Pod sandbox changed, it will be killed and re-created.

我对错误进行了研究,它要么太旧,要么在我的情况下不起作用。任何帮助请!

4

1 回答 1

2

您的问题似乎与 CNI 有关。您可能需要升级。

请在此处查看解决方案。 https://docs.aws.amazon.com/eks/latest/userguide/cni-upgrades.html

于 2019-04-16T23:49:43.433 回答