EvgenPavlyuchek / ha-redis-docker-swarm-kubernetes

Highly available deployment of Redis in Docker, Docker Swarm, and Kubernetes
0 stars 1 forks source link

Cann't communicate via hostname in swarm cluster #1

Open zhuqinghua opened 2 weeks ago

zhuqinghua commented 2 weeks ago

Can you tell me which version of docker is used? In my swarm cluster, the containers cannot communicate with each other by hostname.Thanks

EvgenPavlyuchek commented 2 weeks ago

It was tested about 4 months ago with the latest version available at that time, the one where writing 'version:' in Docker Compose just became deprecated

with such overlay network:

docker network create -d overlay --attachable test

docker compose:

networks:
  test:
    external: true

services:
  redis:
......
    networks:
      - test

  redis-sentinel:
......
    networks:
      - test
zhuqinghua commented 2 weeks ago

It was tested about 4 months ago with the latest version available at that time, the one where writing 'version:' in Docker Compose just became deprecated

with such overlay network:

docker network create -d overlay --attachable test

docker compose:

networks:
  test:
    external: true

services:
  redis:
......
    networks:
      - test

  redis-sentinel:
......
    networks:
      - test

Sorry, I didn't describe it clearly, what I meant was: the version of docker daemon.