tempo icon indicating copy to clipboard operation
tempo copied to clipboard

Document how to deploy Tempo to ingest traces from multiple clusters

Open kvrhdn opened this issue 2 years ago • 9 comments

It's possible to ingest traces from multiple clusters into a single big Tempo instance. I believe this is a fairly common deployment setup, so we should try to describe this in our docs.

We should describe:

  • how to setup ingress (set up a load balancer, add a gateway for authentication and routing)
  • how to collect traces in each cluster and forward them to Tempo (i.e. set up a bunch of Grafana Agents with a service in front, remote write to Tempo)

Also good to mention: load balancing GRPC streams has some tricky behaviour, see https://grpc.io/blog/grpc-load-balancing/

Question about this setup in the community slack: https://grafana.slack.com/archives/C01D981PEE5/p1632219533109300

kvrhdn avatar Sep 22 '21 13:09 kvrhdn

I'm using the following:

  chart:
    repository: https://grafana.github.io/helm-charts
    name: tempo-distributed
    version: 0.9.14

and I added an Ingress object like this:

---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  namespace: prod-tempo
  name: tempo
  annotations:
    kubernetes.io/ingress.class: nginx-internal
    cert-manager.io/cluster-issuer: letsencrypt-prod
    nginx.ingress.kubernetes.io/backend-protocol: GRPC    
spec:
  tls:
  - hosts:
    - otlp-grpc.tempo.internal.<hidden>.io
    secretName: le-prod-tempo
  rules:
  - host: otlp-grpc.tempo.internal.<hidden>.io
    http:
      paths:
      - path: /
        backend:
          serviceName: tempo-tempo-distributed-distributor
          servicePort: 4317

Seems to be working just fine for now. This uses the opensource nginx-ingress in the back + AWS Classic ELB (on private subnet shared between multiple clusters)

BitProcessor avatar Sep 23 '21 12:09 BitProcessor

@BitProcessor do you have any custom config on the AWS Classic LB to make it work? as per AWS docs , the load balancer you are using does not support gRPC protocol.

jacek-czernik avatar Feb 03 '22 14:02 jacek-czernik

@jacek-czernik LB is in TCP mode (which is supported)

BitProcessor avatar Feb 03 '22 14:02 BitProcessor

Tied to getting started content; related to GET updates that covers multi-tenancy.

GrafanaWriter avatar Aug 23 '22 13:08 GrafanaWriter

This issue has been automatically marked as stale because it has not had any activity in the past 60 days. The next time this stale check runs, the stale label will be removed if there is new activity. The issue will be closed after 15 days if there is no new activity. Please apply keepalive label to exempt this Issue.

github-actions[bot] avatar Nov 29 '22 00:11 github-actions[bot]

Would still love to see this doc created for this type of setup, as we're trying to do something similar.

BMonsalvatge avatar Nov 29 '22 16:11 BMonsalvatge

I'm using the following:

  chart:
    repository: https://grafana.github.io/helm-charts
    name: tempo-distributed
    version: 0.9.14

and I added an Ingress object like this:

---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  namespace: prod-tempo
  name: tempo
  annotations:
    kubernetes.io/ingress.class: nginx-internal
    cert-manager.io/cluster-issuer: letsencrypt-prod
    nginx.ingress.kubernetes.io/backend-protocol: GRPC    
spec:
  tls:
  - hosts:
    - otlp-grpc.tempo.internal.<hidden>.io
    secretName: le-prod-tempo
  rules:
  - host: otlp-grpc.tempo.internal.<hidden>.io
    http:
      paths:
      - path: /
        backend:
          serviceName: tempo-tempo-distributed-distributor
          servicePort: 4317

Seems to be working just fine for now. This uses the opensource nginx-ingress in the back + AWS Classic ELB (on private subnet shared between multiple clusters)

hi @BitProcessor , we are using same ingress setup but were wondering do you use 2 different ingress resources for read and write path ? I ask because reading from querier would not be over GRPC but over http, but the ingress has this annotation nginx.ingress.kubernetes.io/backend-protocol: GRPC

mehta-ankit avatar Oct 16 '23 21:10 mehta-ankit

any update ? how to setup ingress for tempo to send traces from more then from 1 cluster

Nello-Angelo avatar Nov 13 '23 18:11 Nello-Angelo