15

Each t2.micro node should be able to run 4 pods according to this article and the command kubectl get nodes -o yaml | grep pods output.

But I have two nodes and I can launch only 2 pods. 3rd pod gets stuck with the following error message.

Could it be the application using too much resource and as a result its not launching more pods? If that was the case it could indicate Insufficient CPU or memory.

Events:
  Type     Reason            Age                From               Message
  ----     ------            ----               ----               -------
  Warning  FailedScheduling  33s (x2 over 33s)  default-scheduler  0/2 nodes are available: 2 Too many pods.
user630702
  • 2,529
  • 5
  • 35
  • 98
  • Pls add to the post `kubectl get po -A`, `kubectl describe node` output for better view what's going on in your cluster. – Olesya Bolobova Nov 23 '20 at 10:42
  • What kind of pods you are deploying there? On top on the previous request can you please update your question with your pods yaml files? – acid_fuji Nov 23 '20 at 10:44
  • Can't speak for deploying on EC2, but I had the same problem as OP when I tried to follow the EKSCTL tutorial on Amazon but with fargate. My fix: I had to create a new nodegroup for my cluster which then could house the nginx pods the https://docs.aws.amazon.com/eks/latest/userguide/sample-deployment.html site was asking me to create. The fargate nodes initially created by `eksctl create cluster` had max pods of 1 each, which was already taken by other `kube-system` pods. – Sonny Mar 28 '21 at 13:59

2 Answers2

20

According to the AWS documentation IP addresses per network interface per instance type the t2.micro only has 2 Network Interfaces and 2 IPv4 addresses per interface. So you are right, only 4 IP addresses.

But EKS deploys DaemonSets for e.g. CoreDNS and kube-proxy, so some IP addresses on each node is already allocated.

Jonas
  • 121,568
  • 97
  • 310
  • 388
0

I had a similar problem, turns out I didn't have my new namespace in my eksctl file.

fargateProfiles:
  - name: fp-core
    selectors:
      - namespace: default
      - namespace: kube-system
      - namespace: flux-system
  - name: fp-airflow
    selectors:
      - namespace: airflow
  - name: fp-airflow2
    selectors:
      - namespace: airflow2

Then to update live configuration, use this:

eksctl create fargateprofile -f dev.yaml

jmcgrath207
  • 1,317
  • 2
  • 19
  • 31