Istio 开发# Istio Data Plane# istio-proxy# 调试 Istio 网格中运行的 Envoy sidecar C++ 代码 介绍 我的动机 环境架构 环境说明 环境搭建步骤 1. 构建带 debug 信息的 istio-proxy 1.1 Clone 源码 1.2 启动 istio-proxy-builder 容器 1.3 构建 istio-proxy 2. 安装测试目标 pod 2.1 构建 istio-proxy docker image 2.2 运行目标 pod 2.3 启动 lldb server 测试 lldb-server(可选,可跳过) 3. attach debuger 到 istio-proxy 3.1 启动 lldb-vscode-server container 3.2 VSCode attach lldb-vscode-server container 3.3 lldb 远程 attach Envoy 进程 3.3.1 创建 launch.json 文件 3.3.2 Attach 远程 Envoy 进程 4. 开始调试 FAQ containerd allow pull image from plain http docker image registry 动态 path 为何用 lldb 而不是 gdb 更 Cloud Native 的远程调试的方法 调试与观察 istio-proxy Envoy sidecar 的启动过程 debug 初始化之难 Envoy 的启动 attach 方法 手工 inject 的 istio-proxy container 1. 定制手工拉起的 istio-proxy 环境 2. 启动 remote debug server 与 vscode debug session 2.1 设置断点 3. 启动 pilot-agent 和 envoy 4. 开始 debug 常用断点 附录 - 写给自己的一些备忘 Istio auto inject 的 sidecar container (我没有使用这种方法) 在 worker node 上 Debugger wait process Debugger follow process fork Debugger wrapper script 流量 debug lldb 常用命令单 Istio Control Plane# Debug Istiod Istio 开发入门参考列表 代码说明 设计文档 开发环境 Istio 项目健康监控 论坛 参与开发 Istio 工作组