Skip to content

Instantly share code, notes, and snippets.

@danehans
Last active July 10, 2018 22:57
Show Gist options
  • Save danehans/07b7181d815ec8ef9152c482765128b0 to your computer and use it in GitHub Desktop.
Save danehans/07b7181d815ec8ef9152c482765128b0 to your computer and use it in GitHub Desktop.
Jaeger Ingress

Introduction

Since Jaeger does not run in the Istio mesh, a different ingress controller is required to expoer Jaeger outside the k8s cluster. I used the nginx ingress controller in a baremetal setup (CCP). Follow the nginx deploy guide and use the baremetal provider.

Jaeger Deployment

Update the Jaeger service to use a different port other than 80:

apiVersion: v1
kind: Service
metadata:
  labels:
    app: jaeger
    chart: tracing-0.1.0
    heritage: Tiller
    release: istio
  name: tracing
  namespace: istio-system
spec:
  ports:
  - name: query-http
    port: 8001
    protocol: TCP
    targetPort: 16686
  selector:
    app: jaeger
  type: ClusterIP

Update the Jaeger service:

kubectl replace -f <above_jaeger_svc.yaml>

Next, create the Ingress resource for Jaeger:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: nginx
  name: jaeger
  namespace: istio-system
spec:
  rules:
  - host: jaeger.example.com
    http:
      paths:
        - path: /
          backend:
            serviceName: tracing
            servicePort: 8001

Use kubectl create -f to create the Ingress resource.

kubectl create -f <above_ingress_spec.yaml>

Get the Host IP of the nginx ingress controller pod to set $IC_IP and test the ingress:

# curl -I -HHost:jaeger.example.com http://$IC_IP:31481/
HTTP/1.1 200 OK
Server: nginx/1.13.12
Date: Tue, 10 Jul 2018 22:53:18 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 1179
Connection: keep-alive
Vary: Accept-Encoding
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment