Deploying Jaeger for Distributed Tracing in Kubernetes
Setting up Jaeger Operator in Kubernetes:
kubectl create namespace observability
kubectl create -f https://github.com/jaegertracing/jaeger-operator/releases/download/v1.29.0/jaeger-operator.yaml -n observability
kubectl get deployment jaeger-operator -n observability
Note: The default image gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0 from Google Container Registry may not be accessible in some environments. To resolve this, download the jaeger-operator.yaml file locally and modify the image reference:
# Original line:
# image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0
# Modified line:
image: quay.io/brancz/kube-rbac-proxy:v0.8.0
After updating the YAML file, apply it with:
kubectl apply -f jaeger-operator.yaml -n observability
The Jaeger Operator needs to communicate with the Kubernetes API server. Ensure appropriate firewall rules are configured to allow this communication instead of disabling the firewall entirely.
Running Jaeger with Docker All-in-One
For quick setup, you can use the all-in-one Jaeger image:
docker pull jaegertracing/all-in-one:1.29
docker run -d --name jaeger \
-e COLLECTOR_ZIPKIN_HOST_PORT=:9411 \
-p 5775:5775/udp \
-p 6831:6831/udp \
-p 6832:6832/udp \
-p 5778:5778 \
-p 16686:16686 \
-p 14268:14268 \
-p 14250:14250 \
-p 9411:9411 \
jaegertracing/all-in-one:1.29
Port Explanations
| Port | Protocol | Component | Function |
|---|---|---|---|
| 5775 | UDP | Agent | Accepts zipkin.thrift over compact thrift protocol (deprecated, used by legacy clients only) |
| 6831 | UDP | Agent | Accepts jaeger.thrift over compact thrift protocol |
| 6832 | UDP | Agent | Accepts jaeger.thrift over binary thrift protocol |
| 5778 | HTTP | Agent | Serves configuration data |
| 16686 | HTTP | Query | Serves the web UI |
| 14268 | HTTP | Collector | Accepts jaeger.thrift directly from clients |
| 14250 | HTTP | Collector | Accepts model.proto |
| 9411 | HTTP | Collector | Zipkin compatible endpoint (optional) |