Problem Description:
1 version: '3' 2 services: 3 config: 4 image: 172.30.253.133:5000/config:v1.0.0 5 networks: 6 cloud-overlay: 7 aliases: 8 - env-config 9 deploy: 10 replicas: 1 11 endpoint_mode: dnsrr 12 placement: 13 constraints: 14 - node.labels.env == Test 15 the ports: 16 - " 8764: 8080 " . 17 Environment: 18 is - ADDITIONAL_EUREKA_SERVER_LIST = HTTP: // eureka1: 8080 / Eureka /, HTTP: // eureka2 : 8080 / Eureka /, HTTP: eureka3 // : 8080 / EURE 19 config
service mode to expose dnsrr, an error such as the title
After modifying solve the problem: as follows
version: "3.2" services: config: image: 172.30.253.133:5000/config:v1.0.0 networks: cloud-overlay: aliases: - env-config deploy: replicas: 1 endpoint_mode: dnsrr placement: constraints: - node.labels.env==test1 ports: - target: 8080 published: 8764 protocol: tcp mode: host #- "8764:8080"
ip ports: - "8764:8080" 会 报 port published with ingress mode can't be used with dnsrr mode
Therefore, to solve the port declaratively reference https://discuss.aerospike.com/t/create-a-cluster-with-docker-swarm/5297/15