2

I tried to create an EKS Kubernetes cluster, for example using this: https://github.com/terraform-providers/terraform-provider-aws/tree/master/examples/eks-getting-started

What I get is all pods are pending:

No nodes available to schedule pods

in kubectl po describe and I get an empty list when I type kubectl get nodes.

Changing AMI images or AWS region doesn't help.

What's wrong?

4
  • 1
    Would highly recommend using this module instead: github.com/terraform-aws-modules/terraform-aws-eks Commented Feb 22, 2019 at 11:58
  • Consider sharing some more information/logs, for example what's the output of kubectl cluster-info or kubectl cluster-info dump?
    – BartoszKP
    Commented Feb 22, 2019 at 13:04
  • Fortunately the module github.com/terraform-aws-modules/terraform-aws-eks helped. Now the cluster works. Thank you.
    – iirekm
    Commented Feb 22, 2019 at 13:08
  • can you share output from kubectl describe node <node-name> Commented Feb 22, 2019 at 14:27

2 Answers 2

2

I was still having issue with the code where the worker nodes register only if eks was set to public subnets only.

module "eks" { subnets = ["${module.vpc.public_subnets}"] }

I did not want my workers to be in public subnets. I changed

module "eks" {
   subnets                              = ["${module.vpc.private_subnets}"]
}

module "vpc" {
   single_nat_gateway = false
}

kubectl get nodes

NAME                                       STATUS    ROLES     AGE       VERSION
ip-10-0-1-247.us-east-2.compute.internal   Ready     <none>    17m       v1.11.5
ip-10-0-1-75.us-east-2.compute.internal    Ready     <none>    17m       v1.11.5
ip-10-0-2-225.us-east-2.compute.internal   Ready     <none>    17m       v1.11.5
ip-10-0-3-210.us-east-2.compute.internal   Ready     <none>    17m       v1.11.5
0

As Matt mentioned https://github.com/terraform-aws-modules/terraform-aws-eks helped. More specifically I just used the example from https://github.com/terraform-aws-modules/terraform-aws-eks/tree/master/examples/eks_test_fixture

All the other examples or running EKS cluster I found on the Internet don't work.

2
  • 1
    Link is dead, could you describe what solved your issue? Commented Feb 4, 2020 at 19:53
  • Don't remember exactly. But anyway, I stopped using eks and used kops. Eks costs, the cost of kops is only the cost of your instances, and it doesn't make any problems.
    – iirekm
    Commented Feb 6, 2020 at 4:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.