Exploration of Docker Swarm alternative #65
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: home/nixos-servers#65
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
While Docker Swarm has worked fine for us for more than a year, it is time to evaluate whether it is still actually needed. Our main use of Docker Swarm is as follows:
It seems there are two alternatives with similar features we can use:
Recent experimentation with k3s shows Kubernetes has way too many moving parts that I am comfortable maintaining and administrating. Therefore let's explore Nomad.
It seems we are looking for a "service mesh", which can be achieved using Consul: https://developer.hashicorp.com/nomad/docs/networking/service-mesh
Benefit is that we can use Podman as container driver, as well as perhaps rootless containers.
Submitting Nomad jobs can be done in Ansible, similar how we do it currently for Docker Swarm: https://docs.ansible.com/ansible/latest/collections/community/general/nomad_job_module.html
It seems service discovery works fully for Nomad, even without Consul: https://traefik.io/blog/traefik-proxy-fully-integrates-with-hashicorp-nomad/ Question that remains though, doed that work on multiple hosts as well or do we need Consul then? It seems yes: we would need Consul for the mesh networking. But we don't need it for the service discovery as Traefik does that for us.
An update: have decided to run k3s in the end :^) The problems I had were mostly related to the fact I was running it in a VM with VirtioFS as filesystem. I am now running this on bare-metal and it works well.
There are some questions left:
file
andsops
. Sops is especially interesting because we can encrypt the secrets. We can use the file-based method as an intermediate step.Nice to have: dns for every service we define. It seems k3s's dns solution supports this (coredns), but needs configuration. Namely, it needs k8s_external plugin enabled. Work around for now: statically assign an ip address to each service. Then configure router for these ips.