Jaeger-operator: How to view ingress

Created on 17 Jul 2020  路  12Comments  路  Source: jaegertracing/jaeger-operator

I have created the operator following the guide
https://www.jaegertracing.io/docs/1.18/operator/

allInOne jaeger

apiVersion: jaegertracing.io/v1
kind: "Jaeger"
metadata:
  name: "perf-jaeger"
spec:
  strategy: allInOne
  allInOne:
    image: jaegertracing/all-in-one:1.13
    options:
      log-level: debug
      query:
        base-path: /jaeger
  ui:
    options:
      dependencies:
        menuEnabled: false
      tracking: 
        gaID: UA-000000-2
      menu:
        - label: "About Jaeger"
          items:
            - label: "Documentation"
              url: "https://www.jaegertracing.io/docs/latest"
  storage:
    options:
      memory:
        max-traces: 100000

the deployment of my service

apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: temv-perf-consumer
  name: temv-perf-consumer
  annotations:
    "sidecar.jaegertracing.io/inject": "true"
spec:
  replicas: 1
  selector:
    matchLabels:
      app: temv-perf-consumer
  template:
    metadata:
      labels:
        app: temv-perf-consumer
    spec:
      containers:
      - image: armdocker.rnd.ericsson.se/sandbox/temv-perf-consumer:latest
        name: temv-perf-consumer
        ports:
        - containerPort: 5000
        env:
          - name: JAEGER_ENDPOINT
            value: http://perf-jaeger-collector:14268/api/traces
          - name: JAEGER_SERVICE_NAME
            value: temv-perf-consumer-svc
          - name: JAEGER_AGENT_HOST
            value: perf-jaeger-agent
          - name: JAEGER_SAMPLER_TYPE
            value: const
          - name: JAEGER_SAMPLER_PARAM
            value: "1"
          - name: JAEGER_REPORTER_LOG_SPANS
            value: "true"
---
apiVersion: v1
kind: Service
metadata:
  name: temv-perf-consumer-svc
spec:
  ports:
  - port: 80
    targetPort: 5000
  selector:
    app: temv-perf-consumer

I still cannot access the UI from Kubernetes cluster ?
Is there something I miss
image

needs-info question

Most helpful comment

Not sure it is a thing with jaeger 1.9.x but i solved it with following ( i use https://services.domain.com/tracing/ )

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/add-base-url: "true"
    nginx.ingress.kubernetes.io/from-to-www-redirect: "true"
    nginx.ingress.kubernetes.io/rewrite-target: /tracing/$2
  name: jaeger
  namespace: observability
spec:
  rules:
  - host: services.domain.com
    http:
      paths:
      - backend:
          serviceName: jaeger-query
          servicePort: 16686
        path: /tracing(/|$)(.*)  #must match Jager spec.query.options.base-path 
  tls:
  - hosts:
    - services.domain.com
    secretName: tracing-tls

and my Jaeger CR yaml file is (with debugging enabled for each component) :

apiVersion: jaegertracing.io/v1
kind: Jaeger
metadata:
  name: jaeger # For clarity we just used jaeger 
  namespace: observability
spec:
  strategy: production
  storage:
    type: elasticsearch 
    options:
      es:
        server-urls: https://df65d4b2795d481dbe235733219ca518.eu-central-1.aws.cloud.es.io:9243
        username: elastic
        password: PASSSSSSWRRRRDDDD
        index-prefix: jaeger
        tls: 
#          skip-host-verify: yes  # This does not work so i used default which validates globally signed certs otherwise use tls.ca
          enabled: yes
      log-level: debug 
#    secretName: jaeger-secret #for ES_USERNAME and ES_PASSWORD
  agent:
    strategy: DaemonSet
    options:
      log-level: debug 
  ingress:
    enabled: false  #Default true. But we need to create custom Ingress for Nginx Ingress and serving thru a subdir
    options:
      log-level: debug 
  collector:
    options: 
      log-level: debug
  query:
    options:
      query:
        base-path: /tracing
      log-level: debug
  ingester:
    options: 
      log-level: debug
  ui:
    options: 
      log-level: debug
      dependencies:
        menuEnabled: false # Default False

All 12 comments

Could you give me the output of kubectl get ingresses? Here's how it looks like for me:

$ kubectl get ingresses
NAME             CLASS    HOSTS   ADDRESS          PORTS   AGE
simplest-query   <none>   *       192.168.39.111   80      99s

Jaeger is then available under http://192.168.39.111 in my case. If you are running on minikube, make sure you have the ingress addon ($ minikube addons enable ingress)

I am on Kubernetes
I disabled the default ingress
with this one
https://github.com/jaegertracing/jaeger-operator/blob/master/deploy/examples/disable-ingress.yaml

Then I created custom

here is the file:

apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: jaeger
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/add-base-url: "true"
    nginx.ingress.kubernetes.io/from-to-www-redirect: "true"
spec:
  tls:
  - hosts:
    - temv-perf-jaeger.moore014.rnd.gic.ericsson.se
  rules:
  - host: temv-perf-jaeger.moore014.rnd.gic.ericsson.se
    http:
      paths:
      - path: /tracing/jaeger
        backend:
          serviceName: jaeger-query
          servicePort: jaeger-query

image

The URL gives bad request

apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: jaeger
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/add-base-url: "true"
    nginx.ingress.kubernetes.io/from-to-www-redirect: "true"
spec:
  tls:
  - hosts:
    - temv-perf-jaeger.moore014.rnd.gic.ericsson.se
  rules:
  - host: temv-perf-jaeger.moore014.rnd.gic.ericsson.se
    http:
      paths:
      - path: /tracing/jaeger
        backend:
          serviceName: jaeger-query
          servicePort: jaeger-query

For simplest I see this
image

Still cannot access

This might be a bit specific to your network, but here's a couple of things to check:

  1. the simplest-query might be available under http://10.117.68.174 or http://10.117.68.175
  2. The jaeger ingress should be available under http://temv-perf-jaeger.moore014.rnd.gic.ericsson.se/tracing/jaeger , but your CR states that the base path is /jaeger. You might want to change the ingress path to /jaeger only or the CR to /tracing/jaeger.
  3. You might want to check the nginx controller logs: $ kubectl logs -n kube-system deployment/ingress-nginx-controller -f
  1. I did try both IPs but they timeout
  2. Now I changed the file content on your suggestion
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: jaeger
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/add-base-url: "true"
    nginx.ingress.kubernetes.io/from-to-www-redirect: "true"
    nginx.ingress.kubernetes.io/rewrite-target: /jaeger
spec:
  tls:
  - hosts:
    - temv-perf-jaeger.moore014.rnd.gic.ericsson.se
  rules:
  - host: temv-perf-jaeger.moore014.rnd.gic.ericsson.se
    http:
      paths:
      - path: /jaeger
        backend:
          serviceName: jaeger-query
          servicePort: jaeger-query

image
I see this still :(

  1. I see nothing from today's date in logs

I'm afraid I can't help you further, as it seems specific to your networking setup. If you can reproduce the problem with a regular minikube, I can try to figure out what's going on.

yeah Sure
Can you verify ingress and deployment files logically ?
If everything is correct?

When I port forward the simplest-query I see it is having spans correctly from the deployed service
The problem is just in the ingress:

apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: simplest-query
spec:
  tls:
  - hosts:
    - jaeger.moore014.rnd.gic.ericsson.se
  rules:
    - host: jaeger.moore014.rnd.gic.ericsson.se
      http:
        paths:
          - path: 
            backend:
              serviceName: simplest-query
              servicePort: 16686

It worked, I added

    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/add-base-url: "true"
    nginx.ingress.kubernetes.io/from-to-www-redirect: "true"
    nginx.ingress.kubernetes.io/rewrite-target: /

to annotations in the ingress.

Nice! Glad to hear you figured this out, and thanks for sharing the solution.

Not sure it is a thing with jaeger 1.9.x but i solved it with following ( i use https://services.domain.com/tracing/ )

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/add-base-url: "true"
    nginx.ingress.kubernetes.io/from-to-www-redirect: "true"
    nginx.ingress.kubernetes.io/rewrite-target: /tracing/$2
  name: jaeger
  namespace: observability
spec:
  rules:
  - host: services.domain.com
    http:
      paths:
      - backend:
          serviceName: jaeger-query
          servicePort: 16686
        path: /tracing(/|$)(.*)  #must match Jager spec.query.options.base-path 
  tls:
  - hosts:
    - services.domain.com
    secretName: tracing-tls

and my Jaeger CR yaml file is (with debugging enabled for each component) :

apiVersion: jaegertracing.io/v1
kind: Jaeger
metadata:
  name: jaeger # For clarity we just used jaeger 
  namespace: observability
spec:
  strategy: production
  storage:
    type: elasticsearch 
    options:
      es:
        server-urls: https://df65d4b2795d481dbe235733219ca518.eu-central-1.aws.cloud.es.io:9243
        username: elastic
        password: PASSSSSSWRRRRDDDD
        index-prefix: jaeger
        tls: 
#          skip-host-verify: yes  # This does not work so i used default which validates globally signed certs otherwise use tls.ca
          enabled: yes
      log-level: debug 
#    secretName: jaeger-secret #for ES_USERNAME and ES_PASSWORD
  agent:
    strategy: DaemonSet
    options:
      log-level: debug 
  ingress:
    enabled: false  #Default true. But we need to create custom Ingress for Nginx Ingress and serving thru a subdir
    options:
      log-level: debug 
  collector:
    options: 
      log-level: debug
  query:
    options:
      query:
        base-path: /tracing
      log-level: debug
  ingester:
    options: 
      log-level: debug
  ui:
    options: 
      log-level: debug
      dependencies:
        menuEnabled: false # Default False
Was this page helpful?
0 / 5 - 0 ratings