0-Home
Github
TraceMyPodsOfficial
TMP-docs
Istiod

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 jaeger


DEMO

๐Ÿ“˜ 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-system namespace
  • kubectl and istioctl are 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 jaeger

You 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
EOF
cat <<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
EOF

4. 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 default

Expected 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/get

Repeat 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 jaeger

Access UI

Open your browser:

http://localhost:16686
  1. Select httpbin.default.svc.cluster.local from the service dropdown
  2. 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.


๐Ÿ’ฌ Need a Quick Summary?

Hey! Don't have time to read everything? I get it. ๐Ÿ˜Š
Click below and I'll give you the main points and what matters most on this page.
Takes about 5 seconds โ€ข Uses Perplexity AI