I've been combing through documentation trying to find out if we are able to implement a specific EKS architecture for our use-case, and have not found a clear answer on how to do it or if it's possible.
Scope
We have several small pods that run 24/7, monitoring for new task requests. When a new task is detected, these monitor pods spin up worker pods, which are much heavier on CPU and Memory requirements.
What we would like to accomplish on EKS is to have 2 (or more) instance types within a single AutoScalingGroup:
Small, cheap instance to run the 24/7 pods
Large, expensive instances to run the tasks and then get terminated.
According to the documentation, having multiple instance types in an ASG is no problem, but it doesn't specify how to ensure that the small pods get assigned to the small instance, and the large pods to the large instance.
Testing done so far:
(Max = 3, Min = 1, Desired = 1)
We currently have the large instance type as priority 1, and the small one as priority 2. So at launch, one large instance gets started.
When I start my small pod with node-selector set to a small instance type, it remains in "pending" state because of the error event: 0/1 nodes are available: 1 node(s) didn't match node selector.
So currently, my question is: How do I make my ASG start a node with a specific instance-type if it is not already running, based on the pod's requirement for that specific instance-type? Any pointers to links, documentation, or suggestions for better approaches are appreciated, thank you!