Gitlab CI with Docker Runners

Why I hate Kubernetes.

When I started using containers after using VMs for stupid things for years I was blown away, totally loved it. Started using Docker and also learned to love Portainer which makes managing the thing a breeze. Then I discovered Gitlab CI and again I fell in love. Totally loved this concept of buildpipelines and runners. Setup a cluster of some PIs and ran a docker runner on each of those. All was sweet and peachy but I learned that I could get more from gitlab by integrating it with Kubernetes instead of just plain docker. So I went ahead and installed Microk8s on a machine. And now I’m totally stuck, don’t know what is going on or what I am doing and have spent an entire weekend over this shit. So, my question: why does this even exist as an option to make life easier for developers? And why is there a serious discrepancy between the support for Kubernetes and the support for Docker Swarm which solves the same problems but with a lot less overhead for developers that are just trying to push code and run and test it?
Containers were meant to make things easier, Kubernetes is the exact opposite of that. It’s a molog infrastructure that is totally unnecessary for most projects, especially in startups.

I completely feel you. Compared to Docker Swarm, Kubernetes is overly complicated and a huge pain to work with. Things that are so easy to do in Docker Swarm are just opaque barriers in K8s.

However, K8s support for namespaces and role based access control, deployments vs replica-sets etc. all provide levels of abstraction that make it much easier for tools like GitLab to manage properly isolated review environments and other features of the full GitLab CI experience. Also Docker-EE was purchased by a company that isn’t offering swarm support past 2022, and Docker (the company) is only commercially pushing docker hub and dev tooling, so its really unclear that putting effort into swarm isn’t entirely wasted.

That said - Docker 20.10 includes “Swarm Jobs” which means that the OSS Docker project is still adding features to swarm, and swarm jobs look bloody fantastic to be a backbone of a CI/CD system so I can only hope GitLab does consider reviewing their lack of interest for further Docker Swarm based development.

Also, I have no particular experience with Mirok8s so I might be speaking out of turn here, but the K8s distribution that made things much easier for me was the K3s and K3d project(s) by rancherlabs. K3s is a really lightweight K8s distribution which can be installed on metal/vms, but comes with a docker-compose so you can literally spin up ethereal instances on docker. The K3d tool makes this even easier.