Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've come to the conclusion (after trying kops, kubespray, kubeadm, kubeone, GKE, EKS) that if you're looking for < 100 node cluster, docker swarm should suffice. Easier to setup, maintain and upgrade.

Docker swarm is to Kubernetes what SQLite is to PostgreSQL. To some extent.



The docker swarm ecosystem is very poor as far as tooling goes. You're better off using docker-compose (? maybe docker swarm) and then migrating to k3s if you need a cluster.

My docker swarm config files are nearly the same craziness as my k3s config files so I figured I might as well benefit from the tooling in Kubernetes.

Edit for more random thoughts: being able to use helm to deploy services helped me switch to k3s from swarm.


This is almost exactly my experience with Docker Compose, which is lionized by commenters in nearly every Kubernetes thread I read on HN. It's great and super simple and easy ... until you want to wire multiple applications together, you want to preserve state across workload lifecycles for stateful applications, and/or you need to stand up multiple configurations of the same application. The more you want to run applications that are part of a distributed system, the uglier your compose files get. Indeed, the original elegant Docker Compose syntax just couldn't do a bunch of things and had to be extended.

IMO a sufficiently advanced Docker Compose stack is not appreciably simpler than the Kubernetes manifests would be, and you don't get the benefits of Kubernetes' objects and their controllers because Docker Compose is basically just stringing low-level concepts together with light automation.


Then the Helm and layers of kustomize are not easy to reason with either.

That's system configuration and that'll become tedious for sure.


Helm and Kustomize are low-budget custom resource definitions. They serve their purpose well and they have few limitations considering how much they can achieve before you write your own controllers.

In my opinion, the complexity is symptomatic of success: once you make a piece of some kind of seemingly narrowly focused software that people actually use, you wind up also creating a platform, if not a platform-of-platforms, in order to satisfy growth. Kubernetes can scale for that business case in ways Docker Swarm, ELB, etc. do not.

Is system configuration avoidable? In order to use AWS, you have to know how a VPC works. That is the worst kind of configuration. I suppose you can ignore that stuff for a very long time, you'll be paying ridiculous amounts of money for the privilege - almost the same in bandwidth costs, transiting NAT gateways and all your load balancers, whatever mistakes you made, as you do in compute usage. Once you learn that bullshit, you know, Kubernetes isn't so tedious after all.


Any sufficiently complicated Docker Swarm, Heroku, Elastic Beanstalk, Nomad or other program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of vanilla Kubernetes.


Most smaller teams do not need a full fledge kubernetes anyways.

There's no one size fits all approach. There are trade offs. The Kubernetes tractor needs lots of oiling and what not for all the bells and whistles.

Trade offs is the keyword here.


Unfortunately, the above statement also applies to kubernetes.


A pithy response to be sure, but is it true? Every Kubernetes object type exists within a well-specified hierarchy, has a well-specified specification, an API version, and documentation. Most of the object families' evolution are managed by a formal SIG. Not sure how any of that qualifies as ad-hoc or informal.


"It's not a mess! it was designed by committee!"

I'm not sure what to say here. The kubernetes docs and code speak for themselves. If you actually think that it's clean, simple, well designed, and easy to operate, with smooth interop between the parts, I can't change your mind. But in practice, I have found it very unpleasant. It seems this is common, and the usual suggestion is to pay someone else to operate it.


First you were complaining that it was ad hoc and informal. Now you seem to be complaining that it's too formal and designed by committee.

Also I never said Kubernetes was well-designed, easy, or simple.


You say that as though bureaucracy is equivalent to formalism. It's not.


Kubernetes is anything but adhoc. That's the best thing, but can also be the most annoying, part about it


I agree in part - the features and simplicity of Docker Swarm are very appealing over k8s, but it also feels like so neglected that I'd be waiting every day for the EOL announcement.


It's built from another separate project called swarm-kit. So if it comes to that where it is abandoned, the forks would be out in the wild soon enough.

I see more risk of docker engine as a whole pulling some terraform/elastic search licensing someday as investors get desperate to cash out.


Docker is largely irrelevant in modern container orchestration platforms. Kubernetes dropped docker support as of 1.24 in favor of CRI-O.

Docker is just one of many implantations of the Open Container Initiative (OCI) specifications. It’s not even fully open source at this point.

Under the hood Docker leverages containerd which in tern leverages runc which leverages libcontainer for spawning processes.

Linux containers at this point will exist perfectly fine if Docker as a corporate entity disappears. The most impact that would be felt would be Dockerhub being shutdown.

They also sort of already did pull something like Hashicorp with their Docker Desktop product for MacOS.

That’s a little different than if Docker disappeared completely, but one could easily switch to Podman (which has a superset of the docker syntax).


> Docker is just one of many implantations of the Open Container Initiative (OCI) specifications. It’s not even fully open source at this point.

How so? I know Docker Desktop wraps its own stuff around docker, but AFAIK docker itself is FOSS.


> I've come to the conclusion (after trying kops, kubespray, kubeadm, kubeone, GKE, EKS) that if you're looking for < 100 node cluster, docker swarm should suffice. Easier to setup, maintain and upgrade.

Personally, I'd also consider throwing Portainer in there, which gives you both a nice way to interact with the cluster, as well as things like webhooks: https://www.portainer.io/

With something like Apache, Nginx, Caddy or something else acting as your "ingress" (taking care of TLS, reverse proxy, headers, rate limits, sometimes mTLS etc.) it's a surprisingly simple setup, at least for simple architectures.

If/when you need to look past that, K3s is probably worth a look, as some other comments pointed out. Maybe some other of Rancher's offerings as well, depending on how you like to interact with clusters (the K9s tool is nice too).


When I was deploying swarm clusters I would have a default stack.yml file with portainer for admin, traefik for reverse-proxying, and prometheus, grafana, alertmanager, unsee, cadvisor, for monitoring and metrics gathering. All were running on their own docker network completely separated from the app and were only accessible by ops (and dev if requested, but not end users). It was quite easy to deploy with HEAT+ansible or terraform+ansible and the hard part was the ci/cd for every app each in its tenant, but it worked really really well.


I’ve been at a company running swarm in prod for a few years. There have been several nasty bugs that are fun to debug but we’ve accumulated several layers of slapped bandaids trying to handle swarm’s deficiencies. I can’t say I’d pick it again, nor would I recommend it for anyone else.


Node count driven infrastructure decisions make little sense.

A better approach is to translate business requirements to systems capabilities and evaluate which tool best satisfies those requirements given the other constraints within your organization.

Managed Kubernetes solutions like GKE require pretty minimal operational overhead at this point.


amount of nodes is a poor position to take... it should be the features and requirements you need for the cluster.

If Docker Swarm satisfies, then yes.


> Docker swarm is to Kubernetes what SQLite is to PostgreSQL. To some extent.

curious what do you mean? To me Postgresql doesn't have disadvantages over SQLite, everything is just better..


PostgreSQL is more complex to use and operate and requires more setup than SQLite. If you don’t need the capabilities of PostgreSQL then you can avoid paying the setup and maintenance costs by using the simpler SQLite.


In simplest case, you do sudo apt install ... in both cases, connect to database and do your work..


I have never had a Postgres install go that easily. There’s still initialization and setup of the server and users. And you’ll have to do something about upgrades as well. Postgres isn’t difficult to set up but SQLite is just a file. It’s much simpler.

And that’s only the installation. Interaction with SQLite as a database is also simpler.

They both have uses but it’s strange to me to assert that they’re equally complex.


> There’s still initialization and setup of the server and users.

that command will create postgres user in the system, you do su to that user, run psql and you all set.

> And you’ll have to do something about upgrades as well

apt will take care of it too

> but SQLite is just a file

there is some "file" in postgresql distribution, people just don't use it, because why they would?

> Interaction with SQLite as a database is also simpler.

any specifics?


SQLite datatypes are advisory so it pretty much just accepts anything you give it.

PostgreSQL definitely says no to schema violations.

These are both features.


I was using docker swarm cause of the simplicity and easy setup but the one feature that I really really need was to be able to specify which runtime to use, either I use runsc (and docker plugins don’t work with runsc) or runc as the default and it was too inefficient to have groups of node with certain runtime, I really do like swarm but it misses too much features that are important


I haven't had much opportunity to work with Docker Swarm, but the one time I did, we hit certificate expiration and other issues constantly, and it was not always obvious what was going on. It soured my perception of it a bit, but like I said I hadn't had much prior experience with it, so it might have been on me.


I didn’t try anything but kubeadm and it worked just fine for me for my 1 node cluster.


Besides my local cluster of virtual box cluster, I have tried Kubernetes on three clouds with at least a dozen different installers/distributions and operational pain would be a factor going forward has always been my gut feeling.

That's where the author also has following to say:

>My conclusion at this point is that if you can afford it, both in terms of privacy/GDPR and dollarinos then managed is the way to go.

And I agree. Kubernetes managed is also really hard for those of offering it and have to manage it for you behind the scenes.[0]

[0]. https://blog.dave.tf/post/new-kubernetes/


I was of the same opinion, so I rolled my own thin layer over Compose:

https://harbormaster.readthedocs.io/


This looks really nice, but the main feature of Docker Swarm rather than, Docker Compose, is the ability to run on a cluster of servers, not just a single node.


Ah, you're right, brain fart, sorry. Hm, I wonder how easily I could change Harbormaster to deploy on Swarm instead of using Compose...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: