Search code examples
nginxkubernetesgoogle-kubernetes-enginejaeger

Jaeger - Service Not Appearing In UI


Hopefully a simple one to answer.

I've deployed a test Nginx Deployment, Service, and Ingress with the agent sidecar annotation, but it's not appearing in Jaeger-Query. I've followed this section of the docs: https://www.jaegertracing.io/docs/1.37/operator/#auto-injecting-jaeger-agent-sidecars

My Nginx .yaml file is configured as below:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: jaeger-nginx-test-deployment
  namespace: observability
  annotations:
    sidecar.jaegertracing.io/inject: "true"
spec:
  selector:
    matchLabels:
      app: nginx
  replicas: 1
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - image: nginx:1.14.2
        name: jaeger-nginx-test-deployment
        ports:
          - containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
  name: jaeger-nginx-test
  namespace: observability
  labels:
    app: nginx
spec:
  ports:
  - port: 80
    protocol: TCP
  selector:
    app: nginx
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: jaeger-nginx-test-ingress
  namespace: observability
  annotations:
    kubernetes.io/ingress.class: "gce"
spec:
  rules:
  - http:
      paths:
      - path: "/*"
        pathType: ImplementationSpecific
        backend:
          service:
            name: jaeger-nginx-test
            port:
              number: 80

Could someone please advise how we can get this to appear in the Jaeger-Query UI?

At the moment it only recognises the 'jaeger-query' service.


Solution

  • The below example worked for me after running:

    kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.3.1/deploy/static/provider/cloud/deploy.yaml
    kubectl create -f https://github.com/jaegertracing/jaeger-operator/releases/download/v1.37.0/jaeger-operator.yaml
    
    
    
    
    
     ---
    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: jaeger-test-deployment
      namespace: observability
      annotations:
        sidecar.jaegertracing.io/inject: "true"
    spec:
      selector:
        matchLabels:
          app: test-deployment
      replicas: 1
      template:
        metadata:
          labels:
            app: test-deployment
        spec:
          containers:
          - name: jaeger-test-deployment
            image: jaegertracing/example-hotrod:1.28
            ports:
              - containerPort: 8080
    ---
    apiVersion: v1
    kind: Service
    metadata:
      name: jaeger-test-deployment
      namespace: observability
      labels:
        app: test-deployment
    spec:
      ports:
      - port: 80
        targetPort: 8080
        protocol: TCP
      selector:
        app: test-deployment
    ---
    apiVersion: networking.k8s.io/v1
    kind: Ingress
    metadata:
      name: jaeger-test-ingress
      namespace: observability
      annotations:
        kubernetes.io/ingress.class: "gce"
    spec:
      rules:
      - http:
          paths:
          - path: "/*"
            pathType: ImplementationSpecific
            backend:
              service:
                name: jaeger-test-deployment
                port:
                  number: 80