友快網

導航選單

第四章、Istio可觀察性-Jaeger

概述

Jaeger

是一個開源的端到端的分散式跟蹤系統,允許使用者在複雜的分散式系統中監控和排查故障。

前提條件

kubernetes 叢集

正確安裝istio

正確部署 bookinfo 示例

安裝

快速安裝——Istio提供的基礎示例

kubectl apply -f istio-1。15。0/samples/addons/jaeger。yaml

配置istio 的configmap

kubectl edit configmap istio -n istio-system

apiVersion: v1data: mesh: |- accessLogFile: /dev/stdout defaultConfig: discoveryAddress: istiod。istio-system。svc:15012 proxyMetadata: {} tracing: zipkin: address: jaeger-collector。istio-system:9411 #修改此處地址值 為jaeger-collector svc 的值 enablePrometheusMerge: true extensionProviders: - envoyOtelAls: port: 4317 service: opentelemetry-collector。istio-system。svc。cluster。local name: otel rootNamespace: istio-system trustDomain: cluster。local meshNetworks: ‘networks: {}’kind: ConfigMapmetadata: annotations: kubectl。kubernetes。io/last-applied-configuration: | {“apiVersion”:“v1”,“data”:{“mesh”:“accessLogFile: /dev/stdout\ndefaultConfig:\n discoveryAddress: istiod。istio-system。svc:15012\n proxyMetadata: {}\n tracing:\n zipkin:\n address: zipkin。istio-system:9411\nenablePrometheusMerge: true\nextensionProviders:\n- envoyOtelAls:\n port: 4317\n service: opentelemetry-collector。istio-system。svc。cluster。local\n name: otel\nrootNamespace: istio-system\ntrustDomain: cluster。local”,“meshNetworks”:“networks: {}”},“kind”:“ConfigMap”,“metadata”:{“annotations”:{},“labels”:{“install。operator。istio。io/owning-resource”:“unknown”,“install。operator。istio。io/owning-resource-namespace”:“istio-system”,“istio。io/rev”:“default”,“operator。istio。io/component”:“Pilot”,“operator。istio。io/managed”:“Reconcile”,“operator。istio。io/version”:“1。15。0”,“release”:“istio”},“name”:“istio”,“namespace”:“istio-system”}} creationTimestamp: “2022-09-07T11:22:10Z” labels: install。operator。istio。io/owning-resource: unknown install。operator。istio。io/owning-resource-namespace: istio-system istio。io/rev: default operator。istio。io/component: Pilot operator。istio。io/managed: Reconcile operator。istio。io/version: 1。15。0 release: istio name: istio namespace: istio-system resourceVersion: “21595883” uid: 5b493c05-d3dc-42ab-ad87-b1820a8b52ca

開啟 Jaeger UI 儀表盤

臨時測試

istioctl dashboard jaeger

暴露 jaeger 透過nodeport 訪問————本示例為偷懶直接使用node15 的公網IP ,假設node 15 的公網IP為:1。1。1。1 本示例實際訪問地址為: 1。1。1。1:32449,

暴露埠請注意安全防範

使用bookinfo 示例產生追蹤

產生追蹤資料

for i in `seq 1 100`; do curl -s -o /dev/null http://istio。bbx。com/productpage; done

檢視追蹤資料

檢視追蹤明細——-點選追蹤記錄檢視詳細資訊

上一篇:炸辣椒油,切忌直接潑熱油,做好重要3步,顏色紅亮,香辣過癮
下一篇:車門系統有限元模擬分析