Kubernetes z-pages
为 Kubernetes 组件提供运行时诊断,深入了解组件运行时状态和配置标志。
特性状态:
Kubernetes v1.32 [alpha]
Kubernetes 核心组件可以暴露一系列 z-endpoints,以便用户更轻松地调试其集群和组件。这些端点严格用于人工检查,以获取组件二进制文件的实时调试信息。应避免自动化抓取这些端点返回的数据;在 Kubernetes 1.33 中,这些是 alpha 特性,其响应格式在未来版本中可能会发生变化。
z-pages
Kubernetes v1.33 允许你启用 z-pages,以帮助你排除核心控制平面组件的问题。这些特殊的调试端点提供了关于运行中组件的内部信息。对于 Kubernetes 1.33,组件会提供以下端点(启用时)
statusz
通过 ComponentStatusz
特性门控 启用,/statusz
端点显示关于组件的高级信息,例如其 Kubernetes 版本、仿真版本、启动时间等。
API Server 返回的 /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 Server 的 /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 日 下午 6:02 CST: Update zpages.md (ae7a5944f3)