docker-swarm-mode

How is load balancing done in Docker-Swarm mode

自作多情 提交于 2019-12-02 20:27:57
I'm working on a project to set up a cloud architecture using docker-swarm. I know that with swarm I could deploy replicas of a service which means multiple containers of that image will be running to serve requests. I also read that docker has an internal load balancer that manages this request distribution. However, I need help in understanding the following: Say I have a container that exposes a service as a REST API or say its a web app. And If I have multiple containers (replicas) deployed in the swarm and I have other containers (running some apps) that talk to this HTTP/REST service.

How to directly mount NFS share/volume in container using docker compose v3

做~自己de王妃 提交于 2019-12-02 14:18:53
I have a compose file with v3 where there are 3 services sharing/using the same volume. While using swarm mode we need to create extra containers & volumes to manage our services across the cluster. I am planning to use NFS server so that single NFS share will get mounted directly on all the hosts within the cluster. I have found below two ways of doing it but it needs extra steps to be performed on the docker host - Mount the NFS share using "fstab" or "mount" command on the host & then use it as a host volume for docker services. Use Netshare plugin - https://github.com/ContainX/docker

What is overlay network and how does DNS resolution work?

瘦欲@ 提交于 2019-11-30 18:02:50
I cannot connect to external mongodb server from my docker swarm cluster. As I understand this is because of cluster uses overlay network driver. Am I right? If not, how does docker overlay driver works and how can I connect to external mongodb server from cluster? François Maturel Q. How does the docker overlay driver work? I would recommend this good reference for understanding docker swarm network overlay, and more globally, Docker's architecture . This states that: Docker uses embedded DNS to provide service discovery for containers running on a single Docker Engine and tasks running in a

What is overlay network and how does DNS resolution work?

一曲冷凌霜 提交于 2019-11-30 01:12:12
问题 I cannot connect to external mongodb server from my docker swarm cluster. As I understand this is because of cluster uses overlay network driver. Am I right? If not, how does docker overlay driver works and how can I connect to external mongodb server from cluster? 回答1: Q. How does the docker overlay driver work? I would recommend this good reference for understanding docker swarm network overlay, and more globally, Docker's architecture. This states that: Docker uses embedded DNS to provide

How can I remotely connect to docker swarm?

社会主义新天地 提交于 2019-11-29 18:28:32
问题 Is it possible to execute commands on a docker swarm cluster hosted in cloud from my local mac? If yes, how? I want to execute command such as following on docker swarm from my local: docker create secret my-secret <address to local file> docker service create --name x --secrets my-secret image 回答1: Answer to the question can be found here. What one needs to do for ubuntu machine is define daemon.json file at path /etc/docker with following content: { "hosts": ["tcp://0.0.0.0:2375", "unix://