In this example we deploy the NGINX or NGINX Plus Ingress Controller and a simple web application. Then we enable OpenTracing and use a tracer (Jaeger) for tracing the requests that go through NGINX or NGINX Plus to the web application.
The default Ingress Controller images don’t include the OpenTracing module required for this example. See Step 1 of the Prerequisites section in the OpenTracing doc for the instructions on how to get the right image with Jaeger tracer.
Follow steps 1-3 of the complete example to deploy the Ingress Controller and the cafe app. Make sure to use the Ingress Controller image with the OpenTracing module and the tracer installed.
-
Use the all-in-one dev template to deploy Jaeger in the default namespace. Note: This template should be only used for development or testing.
kubectl create -f https://raw.githubusercontent.com/jaegertracing/jaeger-kubernetes/master/all-in-one/jaeger-all-in-one-template.yml
-
Wait for the jaeger pod to be ready:
$ kubectl get pod NAME READY STATUS jaeger-6c996dbcd9-j5jzf 1/1 Running
- Update the ConfigMap with the keys required to load OpenTracing module with Jaeger and enable OpenTracing for all Ingress resources.
kubectl apply -f nginx-config.yaml
-
Make a request to the app.
Note: $IC_HTTPS_PORT and $IC_IP env variables should have been set from the Prerequisites step in the complete-example installation instructions.
curl --resolve cafe.example.com:$IC_HTTPS_PORT:$IC_IP https://cafe.example.com:$IC_HTTPS_PORT/coffee --insecure
-
Forward a local port to the Jaeger UI port on the Jaeger pod:
kubectl port-forward <YOUR_JAEGER_POD> 16686:16686
-
Open Jaeger dashboard in your browser available via http://localhost:16686. Search for the traces by specifying the name of the service to
nginx-ingress
and clickingFind Traces
. You will see: