Skip to content

Any way to deal with istio/DestinationRule? #13750

Answered by kflynn
caibirdme asked this question in Q&A
Discussion options

You must be logged in to vote

Linkerd can do header-based routing with HTTPRoute, though you'll need to tweak your Services a bit. The HTTPRoute pattern looks like this:

apiVersion: gateway.networking.k8s.io/v1beta1
kind: HTTPRoute
metadata:
  name: foo-router
spec:
  parentRefs:
    - name: foo
      kind: Service
      group: ""
      port: 80
  rules:
  - matches:
    - headers:
      - name: "v"
        value: "v1"
    backendRefs:
      - name: foo-v1
        port: 80
  - matches:
    - headers:
      - name: "v"
        value: "v2"
    backendRefs:
      - name: foo-v2
        port: 80
  - backendRefs:
    - name: foo-fallback
      port: 80

(The last rule, going to foo-fallback, is the "header v doesn't have an…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@caibirdme
Comment options

@kflynn
Comment options

kflynn Mar 10, 2025
Collaborator

Answer selected by caibirdme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants