Install Istio
Istio install with profiles istioctl install (with profile default) istioctl install --set profile=demo Special for ALB as ingress istioctl install --set profile=demo
--set values.gateways.istio-ingressgateway.type=NodePort
Enable Side car Injection kubectl label namespace ai-assistant istio-injection=enabled
Install Related resources
kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.26/samples/addons/kiali.yaml (opens in a new tab) kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.26/samples/addons/prometheus.yaml (opens in a new tab) kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.26/samples/addons/jaeger.yaml (opens in a new tab) kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.26/samples/addons/grafana.yaml (opens in a new tab)
Access the dashboard
kubectl port-forward svc/kiali 20001:20001 -n istio-system
istioctl dashboard kiali
kubectl port-forward -n istio-system svc/jaeger-query 16686:16686
istioctl dashboard jaegerDEMO
๐ Distributed Tracing with Jaeger on Minikube (Istio)
This guide outlines how to enable distributed tracing in your Minikube cluster using Istio and Jaeger, and deploy demo applications to visualize traces.
๐ Prerequisites
- Minikube cluster with Istio and Kiali installed
- Istio is running in the
istio-systemnamespace kubectlandistioctlare configured
๐ ๏ธ Step-by-Step Guide to Install Jaeger and Enable Tracing
1. Deploy ISTIO in Your Cluster
istioctl install --set profile=demo -y
kubectl get pods -n istio-system 2. Verify Jaeger Deployment
kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.26/samples/addons/jaeger.yaml
kubectl get pods -n istio-system | grep jaegerYou should see a pod named jaeger in the Running state.
3. Configure Istio to Use Jaeger
Create a Telemetry resource:
kubectl apply -f - <<EOF
apiVersion: telemetry.istio.io/v1
kind: Telemetry
metadata:
name: mesh-default
namespace: istio-system
spec:
tracing:
- providers:
- name: jaeger
EOFcat <<EOF | istioctl install -y -f -
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
spec:
meshConfig:
enableTracing: true
defaultConfig:
tracing:
sampling: 100
extensionProviders:
- name: otel-tracing
opentelemetry:
port: 4317
service: opentelemetry-collector.observability.svc.cluster.local
resource_detectors:
environment: {}
- name: jaeger
opentelemetry:
port: 4317
service: jaeger-collector.istio-system.svc.cluster.local
EOF4. Enable Sidecar Injection in Default Namespace
kubectl label namespace default istio-injection=enabled --overwrite๐ฆ Deploy Demo Applications
Deploy httpbin & sleep
kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.26/samples/httpbin/httpbin.yaml
kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.26/samples/sleep/sleep.yaml
Verify Pods
kubectl get pods -n defaultExpected output:
NAME READY STATUS RESTARTS AGE
httpbin-xxxxxxx-xxxxx 2/2 Running 0 1m
sleep-xxxxxxx-xxxxx 2/2 Running 0 1m๐ Generate Traffic to Produce Traces
Use the sleep pod to call httpbin:
kubectl exec -it $(kubectl get pod -l app=sleep -n default -o jsonpath='{.items[0].metadata.name}') -n default -- curl http://httpbin.default.svc.cluster.local:8000/getRepeat several times to generate trace data.
๐ View Traces in Jaeger UI
Port-Forward Jaeger UI
kubectl port-forward -n istio-system svc/jaeger-query 16686:16686
istioctl dashboard jaegerAccess UI
Open your browser:
http://localhost:16686- Select
httpbin.default.svc.cluster.localfrom the service dropdown - Click "Find Traces" to view trace data
โ Conclusion
You now have Jaeger integrated with Istio in Minikube and are successfully generating and viewing trace data from demo applications.