0

I have used the terraform to setup the EKS cluster and worker nodes, they are all working, However, when I try to deploy the K8S dashboard on the cluster by following the documentation on AWS: https://docs.aws.amazon.com/eks/latest/userguide/dashboard-tutorial.html

I got the error below when I was trying to access the localhost:8001

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

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

When I access the pods info, this is what I got:

enter image description here

I have noticed that the Kubernetes-dashboard pod is stuck at ContainerCreating status.

I also check the K8s Dashboard pod info

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.

I did my research about the error, it is either too old or not working in my case. Any helps plz !

Akira
  • 273
  • 5
  • 15

1 Answers1

2

Your problem seems to be with the CNI. You might have to upgrade.

Please check here for the solution. https://docs.aws.amazon.com/eks/latest/userguide/cni-upgrades.html

vins
  • 15,030
  • 3
  • 36
  • 47
  • I have updated the VPC, however, I still cannot connect it. :( – Akira Apr 16 '19 at 23:56
  • You mean you upgraded the CNI to the latest version? – vins Apr 16 '19 at 23:58
  • Ya, I upgraded the CNI to the latest version. However, K8S dashboard pod is still stuck at the ContainerCreating status – Akira Apr 17 '19 at 00:00
  • did you take a look at your security groups? do you allow all the ports from the instances which has the same security group? – vins Apr 17 '19 at 00:39
  • this is the website I am using to build up my terraform code ```https://www.iheavy.com/2018/07/31/how-to-setup-an-amazon-eks-demo-with-terraform/```. I haven't change it much, I am very new to terraform. – Akira Apr 17 '19 at 16:15