开启 pprof 端点
为 Kueue 控制器管理器启用 pprof 端点。
本页面向你展示如何为 Kueue 控制器管理器开启 pprof 端点。
本页面的目标读者是批处理管理员。
开始之前
确保满足以下条件:
- Kubernetes 集群正在运行。
- kubectl 命令行工具能够与你的集群进行通信。
- Kueue 已安装。
开启 pprof 端点
Feature state stable since Kueue v0.5
要开启 pprof 端点,
你需要在管理器的配置中设置 pprofBindAddress
。
在 Kubernetes 中访问 pprof 端口最简单的方法是使用 port-forward
命令。
- 运行以下命令获取运行 Kueue 的 Pod 名称:
kubectl get pod -n kueue-system
NAME READY STATUS RESTARTS AGE
kueue-controller-manager-769f96b5dc-87sf2 2/2 Running 0 45s
- 运行以下命令以启动到本地主机的端口转发:
kubectl port-forward kueue-controller-manager-769f96b5dc-87sf2 -n kueue-system 8083:8083
Forwarding from 127.0.0.1:8083 -> 8083
Forwarding from [::1]:8083 -> 8083
现在,HTTP 端点可以作为一个本地端口来使用。
要了解如何使用暴露的端点,请参阅 pprof 基本用法和示例。
反馈
这个页面有帮助吗?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.