- Jaeger
通过本任务,您将了解如何使应用程序可被 Zipkin 追踪, 而无需考虑应用程序使用何种开发语言、框架或平台。 - 参考安装指南中的说明, 使用如下配置安装 Istio:
2.1 通过设置 --set values.tracing.enabled = true 安装选项以启用 tracing 的“开箱即用”的演示/测试环境。
[root@master bin]# ./istioctl manifest apply --set profile=demo --set values.tracing.enabled=true
Detected that your cluster does not support third party JWT authentication. Falling back to less secure first party JWT. See https://istio.io/docs/ops/best-practices/security/#configure-third-party-service-account-tokens for details.
✔ Istio core installed
✔ Istiod installed
✔ Egress gateways installed
✔ Ingress gateways installed
✔ Addons installed
✔ Installation complete [root@master bin]#
2.2 配置端口转发:
[root@master bin]# kubectl -n istio-system port-forward --address 0.0.0.0 $(kubectl -n istio-system get pod -l app=jaeger -o jsonpath='{.items[0].metadata.name}') 15032:16686
Forwarding from 0.0.0.0:15032 -> 16686
E0701 23:35:31.623881 59333 portforward.go:400] an error occurred forwarding 15032 -> 16686: error forwarding port 16686 to pod db2bcc94d1dc21e2b941e323c6fbeb2d81ce030bc9d41a559aaf30f671aa0c55, uid : unable to do port forwarding: socat not found
^C[root@master bin]# yum install -y socat
Last metadata expiration check: 0:37:37 ago on Wed 01 Jul 2020 11:03:58 PM EDT.
Dependencies resolved.
============================================================================================================================================================================================================================================
Package Architecture Version Repository Size
============================================================================================================================================================================================================================================
Installing:
socat x86_64 1.7.3.3-2.el8 AppStream 302 k
Transaction Summary
============================================================================================================================================================================================================================================
Install 1 Package
Total download size: 302 k
Installed size: 1.1 M
Downloading Packages:
socat-1.7.3.3-2.el8.x86_64.rpm 650 kB/s | 302 kB 00:00
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 88 kB/s | 302 kB 00:03
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : socat-1.7.3.3-2.el8.x86_64 1/1
Running scriptlet: socat-1.7.3.3-2.el8.x86_64 1/1
Verifying : socat-1.7.3.3-2.el8.x86_64 1/1
Installed:
socat-1.7.3.3-2.el8.x86_64
Complete!
[root@master bin]#
[root@master bin]# kubectl -n istio-system port-forward --address 0.0.0.0 $(kubectl -n istio-system get pod -l app=jaeger -o jsonpath='{.items[0].metadata.name}') 15032:16686
Forwarding from 0.0.0.0:15032 -> 1668
2.3 浏览器测试:
![](https://img.haomeiwen.com/i23298577/1cf099252f2b0ad3.png)
2.4 追踪信息由一组 span 组成,每个 span 对应一个 Bookinfo service。这些 service 在执行 /productpage 请求时被调用,或是 Istio 内部组件,例如:istio-ingressgateway
2.4 清理
1. 停止任何可能还在运行的 kubectl port-forward 进程:
$ killall kubectl
- 如果您没有计划探索任何接下来的任务,请参考 Bookinfo 清理中的说明,关闭整个应用程序。
网友评论