Newbie Question, Having problems to configure linkerd, and consul to load balance my GRPC service

Hi,

I am trying to configure linkerd, and consul to load balance my GRPC service, I am finding it difficult to configure. Could any one please help me to figure it out that what I am doing wrong or if I am missing something? Everything is running as Docker container.

Here is the docker-compose.yml file

version: '2'
services:
  consul:
    image: "consul:1.0.0"
    ports:
      - "8500:8500"
      
  linkerd:
    image: buoyantio/linkerd:1.3.1
    command: ['/config.yaml']
    links:
      - consul
    volumes:
      - ./config.yaml:/config.yaml
    ports:
      - 9990:9990
      - 8081:8080
    depends_on:
      - consul-registrator
      
  grpc:
    image: "bb0a96a23f66"
    ports:
      - "8084:80"
    environment:
      - CONSUL_HTTP_ADDR='consul:8500'

  consul-registrator:
    image: gliderlabs/registrator:v7
    command: ['consul://consul:8500']
    links:
      - consul
    volumes:
      - /var/run/docker.sock:/tmp/docker.sock
    depends_on:
      - consul

and here is the config.yaml file

admin:
  ip: 0.0.0.0
  port: 9990

namers:
- kind: io.l5d.consul
  includeTag: false
  useHealthCheck: false
  host: consul

routers:
- protocol: h2
  label: grpc
  experimental: true
  dtab: |
    /svc => /#/io.l5d.consul/dc1;
  identifier:
    kind: io.l5d.header.path
    segments: 2
  servers:
  - port: 8084
    ip: 0.0.0.0
  client:
   requeueBudget:
     percentCanRetry: 5.0

Hey @nikeshgupta I noticed that your configuration looks very similar to this linkerd example. One thing that I noticed that was different was the ports linkerd used to listen to requests. It would be good to try changing this to 4140 and also make sure the linkerd service in the docker-compose file exposes the same port as well. In regards to figuring out the correct configuration, what errors are you seeing in the logs? Is there any information in the logs from the linkerd image that may provide additional clues?

Hi @deebo91

Thanks for your response. The way yo suggested to use the port number, I did it but not success so far. And from the logs of linkerd image I couldn’t figure it out that if something is wrong there.

I am completely lost while trying to make it working

Regards
Nikesh

Hi @nikeshgupta,

I’ve also noticed that you do not have a service image in your docker-compose.yml, as we have in the example @deebo91 linked to:

service:
        image: buoyantio/helloworld
        command: ["-addr=:7777", "-text=Hello"]
        ports:
          - "7777:7777"

Here is a link to our example repo.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.