0

Edit - Is it even possible to achieve it or I should be looking into something else?

How can I integrate envoy with consul for automatic service discovery and routing? I've the containers running in docker and each container is registering with the consul at run time.

My docker-compose file looks like this.

version: '3'

services:

  consul:
    image: consul:1.6
    container_name: consul
    ports:
      - 8300:8300
      - 8400:8400
      - 8500:8500

  envoy:
    container_name: envoy
    build:
      context: ./envoy
      dockerfile: Dockerfile
    ports:
      - 10000:10000

  user:
    container_name: user
    build:
      context: ./user
      dockerfile: Dockerfile

Let's say user is registered to consul with the Id foo running at port 80 and the request to the envoy proxy comes as http://localhost:10000/user


envoy/envoy.yaml

admin:
  access_log_path: /tmp/admin_access.log
  address:
    socket_address: { address: 0.0.0.0, port_value: 9901 }
AppDeveloper
  • 123
  • 4

1 Answers1

0

We had to decide an alternative to Nginx (with consul-template) and also had envoy on our list but decided to use Traefik.io instead.

We still use consul-template to render configuration, but the reasons for this are in our special service-setup.

We didn't want to introduce a new abstraction-layer only for Envoy -> traefik it is

ppuschmann
  • 598
  • 1
  • 4
  • 16