Comparison with Docker Swarm

Compare Kubernetes Ingress to the Docker Swarm equivalent.

Similarities

Both Kubernetes and Docker Swarm have Ingress, and it might sound compelling to compare them and explore the differences. While that might seem like the right thing to do, there is a problem. Ingress works quite differently across the two.

Swarm Ingress networking is much more similar to Kubernetes Services. Both can be used to expose ports to clients both inside and outside a cluster. If we compare the two products, we’ll discover that Kubernetes Services are similar to a combination of Docker Swarm’s Overlay and Ingress networking. The Overlay is used to provide communication between applications inside a cluster, and Swarm’s Ingress is a type of the Overlay network that publishes ports to the outside world.

Note: The truth is that Swarm does not have an equivalent to Kubernetes Ingress controllers. That is, if we do not include Docker Enterprise Edition in the mix.

The fact that a Kubernetes Ingress equivalent does not ship with Docker Swarm does not mean that similar functionality cannot be accomplished through other means. It still can. Traefik, for example, can act both as a Kubernetes Ingress Controller and a dynamic Docker Swarm proxy. It provides, more or less, the same functionality no matter which scheduler we choose. If you’re looking for a Swarm-specific alternative, you might choose Docker Flow Proxy.

All in all, as soon as we stop comparing Ingress on both platforms and start looking for a similar set of functionality, we can quickly conclude that both Kubernetes and Docker Swarm allow a similar set of features. We can use paths and domains to route traffic from a single set of ports (e.g., 80 and 443) to a specific application that matches the rules. Both allow us to offload SSL certificates and provide solutions that dynamically make all the necessary configurations.

Get hands-on with 1400+ tech skills courses.