How to use more than one service on linkerd?

Hi All,

I am trying to understand on how to redirect more than one service to linkerd ingress. With one there’s no problem, I just place a dtab called internal and it just works. I am wondering how to add another service to be seen by ingress?

Hi @sokoow!
To be clear, you’re trying to use linkerd as an ingress controller, right? Pasting your configs here would help us understand your issue better.

To send traffic to multiple services using linkerd as an ingress controller, the dtab stays the same. It’s the ingress resource that you would change to add multiple services. For example:

apiVersion: extensions/v1beta1
kind: Ingress
  name: multi-ingress
  namespace: default
annotations: "linkerd"
  - http:
      - path: /foo
          serviceName: foo
          servicePort: 80
      - path: /bar
          serviceName: bar
          servicePort: 80

The linkerd config is the same no matter how many services:

- protocol: http
    kind: io.l5d.ingress
    namespace: default
  - port: 4140
  dtab: /svc => /#/io.l5d.k8s

- kind: io.l5d.k8s

Hopefully this answers your question

Hey, thanks very much for your response :slight_smile: To answer your question: yes… and no. I’m trying to get an ingress that will handle multiple services, plus a way of shifting traffic between them. So let’s say I got two services, two versions of sotware each and I want to be able to flip back and forth between versions (with fluent % of traffic dial, as linkerd does).

Here’s my dtab:

/srv                    => /#/io.l5d.k8s/default/http ;
/domain/rocks/linkerd/linkerd-http => 1 * /srv/helloworld-v1 & 3 * /srv/helloworld-v2 ;
/host                   => /$/io.buoyant.http.domainToPathPfx/domain ;
/svc                    => /host ;

I just used the default linkerd-namerd.yaml file from examples directory for linkerd deployment on my Kube.

That dtab looks correct to me. Does it only serve helloworld-v1? Or what is the actual issue here? And what are the exact steps to reproduce?

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