Kubernetes z-pages
提供 Kubernetes 组件的运行时诊断,深入了解组件的运行时状态和配置标志。
功能状态:
Kubernetes v1.32 [alpha]
Kubernetes 核心组件可以暴露一组 z-endpoints,以便用户更容易地调试其集群及其组件。这些端点仅供人工检查,以获取组件二进制文件的实时调试信息。请避免自动抓取这些端点返回的数据;在 Kubernetes 1.34 中,它们是一项 **alpha** 功能,响应格式在未来版本中可能会发生变化。
z-pages
Kubernetes v1.34 允许您启用 z-pages 来帮助您排查其核心控制平面组件的问题。这些特殊的调试端点提供有关正在运行组件的内部信息。对于 Kubernetes 1.34,组件(启用后)会提供以下端点:
statusz
使用 ComponentStatusz
功能门启用后,/statusz
端点会显示组件的高级信息,例如其 Kubernetes 版本、仿真版本、启动时间和更多信息。
API 服务器的 /statusz
响应类似于:
kube-apiserver statusz
Warning: This endpoint is not meant to be machine parseable, has no formatting compatibility guarantees and is for debugging purposes only.
Started: Wed Oct 16 21:03:43 UTC 2024
Up: 0 hr 00 min 16 sec
Go version: go1.23.2
Binary version: 1.32.0-alpha.0.1484+5eeac4f21a491b-dirty
Emulation version: 1.32.0-alpha.0.1484
flagz
使用 ComponentFlagz
功能门启用后,/flagz
端点会显示用于启动组件的命令行参数。
API 服务器的 /flagz
数据看起来像这样:
kube-apiserver flags
Warning: This endpoint is not meant to be machine parseable, has no formatting compatibility guarantees and is for debugging purposes only.
advertise-address=192.168.8.2
contention-profiling=false
enable-priority-and-fairness=true
profiling=true
authorization-mode=[Node,RBAC]
authorization-webhook-cache-authorized-ttl=5m0s
authorization-webhook-cache-unauthorized-ttl=30s
authorization-webhook-version=v1beta1
default-watch-cache-size=100
最后修改于 2025 年 2 月 25 日,太平洋标准时间上午 2:02: 更新 zpages.md (ae7a5944f3)