GitLab CI on AWS EKS Fargate

My end goal is to have a K8s cluster (AWS EKS) using Fargate to autoscale builds.

Right now I do builds using GitLab Runners installed (Docker) on a few machines but those machines obviously need to be up all the time and there’s a limited number of them. Ideally it would be nice if “up to some maximum number” of builds can happen in parallel all in Fargate.

So, my first attempt was to get a cluster up and running but installing the GitLab Runner failed as there are apparently no nodes upon which to run the installer. I kind of thought this all would have allocated a pod for me since it’s attempting to spawn a “thing” but maybe I need to at least have an EC2 attached to the cluster to “host” the runner?

Probably asking the wrong question the wrong way since I’m pretty new to all of this but that’s where I’m stuck. The runner won’t install in the cluster (lists as “pending” with an error saying “0/2 nodes are available: 2 Too many pods.”).

Kind of wondering if it’ll even work once it does get installed. Will the runner even use Fargate to spawn the pods to do the builds? Advice welcome.

Hi @paul.braman
Please see official docs for Fargate
As stated in the docs you need EC2 to host the GitLab Runner daemon.

Well …

I installed an EC2 as a single-instance nodegroup using eksctl (just to host the GitLab Runner) but it seems to be spawning tasks on the EC2 instead of on the cluster through Fargate.

So something’s still not exactly correct here.

Please note that the page linked above talks about ECS not EKS when discussing Fargate. Maybe I need to rethink this whole thing and use ECS instead of EKS.