From Compose to Swarm to Kubernetes
Select an icon to see what it is.
Step 4 of 6
A published port reaches every replica
In Swarm, a published port opens on every node through the routing mesh, and a connection to any node is forwarded to one of the tasks. Kubernetes does this with a Service object, which gives the pods one stable address. Both solve the problem of many replicas behind one address.
Swarm and Kubernetes compared
Swarm: published port on every node, forwarded to a taskKubernetes: Service gives the pods one stable address (ClusterIP, NodePort or load balancer)