Kubernetes z 頁面

功能狀態: Kubernetes v1.32 [alpha]

Kubernetes 核心元件可以公開一套z 終端節點,讓使用者更容易偵錯其叢集及其元件。這些端點嚴格來說僅供人工檢查使用,以取得元件二進位檔的即時偵錯資訊。避免自動抓取這些端點傳回的資料;在 Kubernetes 1.32 中,這些是 alpha 功能,且回應格式在未來版本中可能會變更。

z 頁面

Kubernetes v1.32 允許您啟用 z 頁面,以協助您針對核心控制平面元件的問題進行疑難排解。這些特殊的偵錯端點提供關於執行中元件的內部資訊。對於 Kubernetes 1.32,元件提供以下端點 (啟用時)

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
上次修改時間為 2024 年 11 月 25 日上午 9:52 PST:Update content/en/docs/reference/instrumentation/zpages.md (9b347d462b)