AWS Elastic Kubernetes (EKS) not autoscaling

2/14/2022

I have AWS EKS cluster (c5.large instance - 2 core) which I use to dynamically create POD. The EKS cluster is created using Terraform (terraform-aws-modules/eks/aws - v17.24.0). This is primarily used to handle any asynchronous work.

CoreV1Api api = new CoreV1Api(client);

V1Pod pod = new V1PodBuilder()... build(); //Various initialization parameters

api.createNamespacedPod("default", pod, null, null, null);

Each V1Pod object receives unique task id, it is supposed to execute. I noticed that when I request EKS to schedule the POD (while one is already running), the subsequent POD goes into wait mode and EKS doesn't autoscale. Since POD is constrained to use 1 core, I was expecting the 2nd request to launch POD should have resulted into creation of another worker node. But this doesn't seem to be happening and all PODs wait for prior pod to complete its work.

Disclaimer: I do not have any deployment defined as all the PODs are dynamically scheduled using the above API.

-- CuriousMind
amazon-eks
amazon-web-services
kubernetes

0 Answers