No nodes available to schedule pods
Closed this issue · 4 comments
Hello, I followed the README and did a terraform apply
. The apply went through without a hitch and no errors but I see that the pods are in Pending
state. When I tried a kubectl describe pods
on the hello-kubernetes.yaml
I applied, the issue is as follows:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedScheduling 3m48s (x122 over 124m) default-scheduler no nodes available to schedule pods
I went further and did this and discovered the source of the problem:
$ kubectl get nodes -o wide --kubeconfig ./kubeconfig
No resources found
Any insight into how to fix this? Again, this is after doing a terraform apply
Hi, this module by default only creates the eks cluster control plane
if you don't define any of the options node_groups
, managed_node_groups
, or fargate_profiles
.
For more details, please refer to the other examples.
- https://github.com/Young-ook/terraform-aws-eks/tree/main/examples/lb
- https://github.com/Young-ook/terraform-aws-eks/tree/main/examples/fargate
Thanks.
Yes, when I tried adding that module and doing terraform apply
, I got this error:
Error: Error creating IAM Role eks-cp: EntityAlreadyExists: Role with name eks-cp already exists.
│ status code: 409, request id: e7a149e9-8d66-455e-bc22-a831c3b536a5
I checked in the terraform folder and I see the module trying to add two aws_iam_role
named cp
:
.//.terraform/modules/eks-fargate/main.tf
resource "aws_iam_role" "cp" {
and tries to create it again elsewhere:
.//.terraform/modules/eks/main.tf
resource "aws_iam_role" "cp" {
So, I understood that either eks
or eks-fargate
modules should be used, but when I commented out eks
module, I got this error upon terraform plan
:
Error: Reference to undeclared module
│
│ on main.tf line 23, in module "vpc":
│ 23: tags = module.eks.tags.shared
│
│ No module call named "eks" is declared in the root module.
╵
╷
│ Error: Reference to undeclared module
│
│ on outputs.tf line 3, in output "eks":
│ 3: value = module.eks.cluster
│
│ No module call named "eks" is declared in the root module.
╵
╷
│ Error: Reference to undeclared module
│
│ on outputs.tf line 8, in output "role":
│ 8: value = module.eks.role
│
│ No module call named "eks" is declared in the root module.
╵
╷
│ Error: Reference to undeclared module
│
│ on outputs.tf line 13, in output "kubeconfig":
│ 13: value = module.eks.kubeconfig
│
│ No module call named "eks" is declared in the root module.
╵
╷
│ Error: Reference to undeclared module
│
│ on outputs.tf line 18, in output "features":
│ 18: value = module.eks.features
│
│ No module call named "eks" is declared in the root module.
So I think a few things are broken with the instructions.
I changed the references to module.eks
to module.eks-fargate
and made some progress, but choked on a specific region's az not being able to create fargate profiles. I changes my region, but landed on a subnet issue (Subnet subnet-xyz provided in Fargate profile is not a private subnet
, but my *.tf
does not create this subnet, so now trying a completely new region/az combo).
Running Fargate on EKS is extremely far from straightforward, and a module doesn't help. Maybe I am doing something very wrong.
Hello,
After several adjustments, I could get this to finally run. The last problem I discussed above had to do with the value of subnets
not being set for the block for module eks-fargate
. Please let me know if you would like me to submit a PR with these changes to help someone else who comes over to your repo.
Thanks!
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.