KVM + Docker Swarm

max78

New Member
May 10, 2022
5
0
1
Hello,


I have installed Debian 11 in the KVM and inside I like to use Docker Swarm.

Docker works without problems.

But if I use Swarm, I can’t access the exposed Ports from outside.
I tried NGINX to Port 8080 and Portainer. Both doesn’t work from outside. From inside the KVM I can reach this ports.
From outside the KVM I can reach (the same) normal docker ports, with swarm I can’t reach the ports.

Does anyone know a solution?


Thanks, Markus
 
How did you check the connection? Did you try something like "telnet host/ip port"?
 
I tried it with a browser in windows in the same network. (the normal docker container works there)
In the KVM it works with curl.
 
Last edited:
Can you connect to it when you disable the firewall on the network device?
 
Have you created the special network mode in order to get working docker swarm? I haven't used it for years (swarm is dead) and I cannot remember what I did exactly, but I remember that just easy-peasy docker-compose up did not do the trick. There was something else involved in creating a special network layer in order to get it to work. Hope that helps at least a little bit.
 
I thought normal swarm setup is enough, because docker is running fine.
It’s my first swarm setup. I didn’t changed the network layers… This would be the problem.

I like to setup some docker container for HA use.

I thought it’s easy with swarm because of the integrated load balancer. But I now know I have do use something like HAProxy. And for some containers, like Mysql it’s even more difficult.

What do you recommend instead of swarm? Kubernetes?