Search code examples
amazon-web-servicesamazon-eksaws-fargatecoredns

Failed to schedule core-dns on fargate: timed out while waiting for "coredns" to be scheduled on Fargate


I'm following this doc to create an EKS cluster with the below command:

eksctl create cluster --name my-cluster --region ap-south-1 --fargate

While trying to create an cluster with eksctl, it's giving me this error after about 30 mins:

2023-08-21 01:05:46 [ℹ]  waiting for CloudFormation stack "eksctl-eks-sample-cluster2-cluster"
2023-08-21 01:06:46 [ℹ]  waiting for CloudFormation stack "eksctl-eks-sample-cluster2-cluster"
2023-08-21 01:08:49 [ℹ]  creating Fargate profile "fp-default" on EKS cluster "eks-sample-cluster2"
2023-08-21 01:11:00 [ℹ]  created Fargate profile "fp-default" on EKS cluster "eks-sample-cluster2"
2023-08-21 01:11:31 [ℹ]  "coredns" is now schedulable onto Fargate
2023-08-21 01:36:33 [!]  1 error(s) occurred and cluster hasn't been created properly, you may wish to check CloudFormation console
2023-08-21 01:36:33 [ℹ]  to cleanup resources, run 'eksctl delete cluster --region=ap-south-1 --name=eks-sample-cluster2'
2023-08-21 01:36:33 [✖]  failed to schedule core-dns on fargate: timed out while waiting for "coredns" to be scheduled on Fargate

Tried extending the timeout but still it's the same. Also tried without --fargate, no use.

Tried setting --vpc-private-subnets option, no use.

When checking on the CloudFormation Stack, no Nodes are created in the CoreDNS section it says 'No nodes setup to schedule pods'.

But in the documentation, it says everything will get created and configured automatically.

Is it because I configured eksctl with root user credentials?

Can anyone please help me on resolving this?


Solution

  • It was with my AWS account. It was in the Basic Plan and the Free Tier was over which I presume is what has blocked it from creating Nodes.

    I created a new AWS account and when tried with it, this worked well.