Comment on Kubernetes? docker-compose? How should I organize my container services in 2024?
nopersonalspace@lemmy.world 9 months agoThanks for this, I’ve been sort if interested in both Nomad and NixOS for the exact reasons it seems like you use them. Thanks for linking that repo, I’ll check it out for inspiration!
Do you find that you sometimes struggle to get things working in Nomad? My one worry is that, because it’s not as well established as kubernetes or docker, there won’t be good compatibility or documentation. For example most services in their docs will show how to deploy with kubernetes or docker, but rarely Nomad. Do you find that it’s easy enough to translate these instructions that it doesn’t matter?
nico@r.dcotta.eu 9 months ago
Good question! So it depends, but TLDR: imo it’s worth it, or it’s fine, but it’s easy to try yourself and see
You are absolutely correct, but I do find that for the large large majority of things, either you can find an online Nomad config, or the Nomad config is easy enough to translate from Docker compose. Only some complicated larger deployments (think Immich) are harder to translate, but even then it just takes some trial and error. I really do think that extra trouble of translating is very much worth the pain you save yourself in terms of deploying k8s though. You might spend a bit longer typing out the Nomad job file yourself, but in exchange you are thankfully not maintaining the k8s cluster.
As far Nomad-specific documentation goes, I think it the official one with more than good enough.
You mentioned compatibility. So far I have not found anything I really wanted that was not possible to set up in Nomad. Nomad does CNI and CSI, which is the same API k8s uses, so thinkgs working there will work for Nomad. Other things you would use with docker compose or k8s don’t work with Nomad, but you don’t need them (for example: portainer or metrics exporters) because Nomad has them natively already (this blog discusses that).
As you can see I am pretty opinionated towards Nomad - I have been using it in my previous job in prod, and in my home-lab for a year now, and I am very happy with it. If you would like to read more I recommend this blog post. For Nomad on NixOS I wrote this one.
For now my advice is: just try nomad yourself (as simple as running
nomad agent -dev
on your laptop), run the tutorial, and see if it was easy enough that you see yourself using it for the rest of your containers. If you need more help you are welcome to DM me :)