Grpc + Http Dynamic Routing

Hey All -

I’m having a hard time working on dynamic routing for both HTTP / GRPC. l5d-dtab works great on HTTP, but unfortunately, it’s not working on grpc for me and seems that the feature is not implemented yet.

Mainly the goal is to have versioned services for both grpc and http.

{servicename} => service-version POD.

Best case story is if I can set some sort of header in gRPC and HTTP where it translates:

  1. The service name => pod name
  2. header -> version=X for label

I found this config for mapping gRPC services, but could use help on label selection example for both HTTP and gRPC.

apiVersion: extensions/v1beta1
kind: Ingress
name: map-service
annotations: "linkerd"
  serviceName: map-service
  servicePort: 8080

@Disturbing, just for my own understanding with this issue, are you looking create two seperate ingresses (one for GRPC and one for HTTP)? If you are then setting the label to anything you want should suffice. In your linkerd config, you could then set up two ingress routers and use the ingressClassAnnotation field to match each router with the respective ingress. Does that sound like something that could work?

I can’t figure out how to have LinkerD route gRPC Versioning via metadata.

Simply would want to set a header like in this example:


using the dtab override header. It works for HTTP, but not for gRPC.

@Disturbing, unfortunately labelSelector's only select on Service objects, not pods.

I think the most straightforward way to solve this issue is to create two separate Service objects in Kubernetes, and route to them by name as I assume you are already doing.

There’s an open issue to make labelSelector's filter on pods, allowing you to do more interesting things like curl v2.myservice:

1 Like